bool tess_present, bool gs_present)
{
const struct gen_device_info *devinfo = &batch->screen->devinfo;
- const struct gen_l3_config *l3_config = batch->screen->l3_config_3d;
- const unsigned push_size_kB = 32;
unsigned entries[4];
unsigned start[4];
ice->shaders.last_vs_entry_size = size[MESA_SHADER_VERTEX];
- gen_get_urb_config(devinfo, 1024 * push_size_kB,
- 1024 * gen_get_l3_config_urb_size(devinfo, l3_config),
+ gen_get_urb_config(devinfo, batch->screen->l3_config_3d,
tess_present, gs_present,
size, entries, start);
void gen_dump_l3_config(const struct gen_l3_config *cfg, FILE *fp);
void gen_get_urb_config(const struct gen_device_info *devinfo,
- unsigned push_constant_bytes, unsigned urb_size_bytes,
+ const struct gen_l3_config *l3_cfg,
bool tess_present, bool gs_present,
const unsigned entry_size[4],
unsigned entries[4], unsigned start[4]);
*/
void
gen_get_urb_config(const struct gen_device_info *devinfo,
- unsigned push_constant_bytes, unsigned urb_size_bytes,
+ const struct gen_l3_config *l3_cfg,
bool tess_present, bool gs_present,
const unsigned entry_size[4],
unsigned entries[4], unsigned start[4])
{
+ const unsigned urb_size_kB = gen_get_l3_config_urb_size(devinfo, l3_cfg);
+ const unsigned push_constant_kB =
+ (devinfo->gen >= 8 || (devinfo->is_haswell && devinfo->gt == 3)) ? 32 : 16;
+
const bool active[4] = { true, tess_present, tess_present, gs_present };
/* URB allocations must be done in 8k chunks. */
- const unsigned chunk_size_bytes = 8192;
+ const unsigned chunk_size_kB = 8;
+ const unsigned chunk_size_bytes = chunk_size_kB * 1024;
- const unsigned push_constant_chunks =
- push_constant_bytes / chunk_size_bytes;
- const unsigned urb_chunks = urb_size_bytes / chunk_size_bytes;
+ const unsigned push_constant_chunks = push_constant_kB / chunk_size_kB;
+ const unsigned urb_chunks = urb_size_kB / chunk_size_kB;
/* From p35 of the Ivy Bridge PRM (section 1.7.1: 3DSTATE_URB_GS):
*
const unsigned entry_size[4])
{
const struct gen_device_info *devinfo = &device->info;
-#if GEN_IS_HASWELL
- const unsigned push_constant_kb = devinfo->gt == 3 ? 32 : 16;
-#else
- const unsigned push_constant_kb = GEN_GEN >= 8 ? 32 : 16;
-#endif
-
- const unsigned urb_size_kb = gen_get_l3_config_urb_size(devinfo, l3_config);
unsigned entries[4];
unsigned start[4];
- gen_get_urb_config(devinfo,
- 1024 * push_constant_kb, 1024 * urb_size_kb,
+ gen_get_urb_config(devinfo, l3_config,
active_stages &
VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
active_stages & VK_SHADER_STAGE_GEOMETRY_BIT,
bool gs_present, bool tess_present)
{
const struct gen_device_info *devinfo = &brw->screen->devinfo;
- const int push_size_kB =
- (devinfo->gen >= 8 || (devinfo->is_haswell && devinfo->gt == 3)) ? 32 : 16;
/* BRW_NEW_{VS,TCS,TES,GS}_PROG_DATA */
struct brw_vue_prog_data *prog_data[4] = {
unsigned entries[4];
unsigned start[4];
- gen_get_urb_config(devinfo, 1024 * push_size_kB, 1024 * brw->urb.size,
+ gen_get_urb_config(devinfo, brw->l3.config,
tess_present, gs_present, entry_size, entries, start);
if (devinfo->gen == 7 && !devinfo->is_haswell && !devinfo->is_baytrail)