diff options
author | Jason Ekstrand <[email protected]> | 2020-01-16 17:02:26 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2020-01-30 18:46:18 -0600 |
commit | 73a684964b392c4df84373e8419e355267d57ff5 (patch) | |
tree | 94fab56a3c3bacd0fe6989541b13b3ff9c2db7a2 /src/intel/common | |
parent | 9d05822cb8b5d3fd066c64722b76b3507a7fd24f (diff) |
intel: Take a gen_l3_config in gen_get_urb_config
Instead of making each driver pass in the same push constant size and do
it's own L3$ config URB size calculation, just make them pass in their
L3$ configuration.
Cc: "20.0" [email protected]
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>
Diffstat (limited to 'src/intel/common')
-rw-r--r-- | src/intel/common/gen_l3_config.h | 2 | ||||
-rw-r--r-- | src/intel/common/gen_urb_config.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/intel/common/gen_l3_config.h b/src/intel/common/gen_l3_config.h index 33da8bb19de..36414321c49 100644 --- a/src/intel/common/gen_l3_config.h +++ b/src/intel/common/gen_l3_config.h @@ -93,7 +93,7 @@ gen_get_l3_config_urb_size(const struct gen_device_info *devinfo, 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]); diff --git a/src/intel/common/gen_urb_config.c b/src/intel/common/gen_urb_config.c index 1440dd713e9..ba96966dff1 100644 --- a/src/intel/common/gen_urb_config.c +++ b/src/intel/common/gen_urb_config.c @@ -59,19 +59,23 @@ */ 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): * |