diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2020-01-16 17:02:26 -0600 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-01-31 08:50:30 -0800 |
commit | c9cf6b5f60a6b405d2d2dadd3e14e636403d3386 (patch) | |
tree | 08334d88b6b12d6a96ba856cfca1605b0b15d94a /src/intel/common/gen_urb_config.c | |
parent | 46c731477041dc4c6db1965493c5cbc46f470647 (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" mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3454>
(cherry picked from commit 73a684964b392c4df84373e8419e355267d57ff5)
Diffstat (limited to 'src/intel/common/gen_urb_config.c')
-rw-r--r-- | src/intel/common/gen_urb_config.c | 14 |
1 files changed, 9 insertions, 5 deletions
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): * |