anv, iris: Disable pre fetching the binding table entries on DG2
On DG2 the HW will fetch the binding entries into the cache for every single thread when a compute walker is dispatched, wiping out the advantages of the cache prefetch. The spec also advises to not do a cache prefetch when we have more than 31 binding table entries, but most real world applications will never hit that limit. Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18498>
This commit is contained in:
@@ -2169,8 +2169,11 @@ genX(compute_pipeline_emit)(struct anv_compute_pipeline *pipeline)
|
||||
.SamplerCount = GFX_VER == 11 ? 0 : get_sampler_count(cs_bin),
|
||||
/* We add 1 because the CS indirect parameters buffer isn't accounted
|
||||
* for in bind_map.surface_count.
|
||||
*
|
||||
* Typically set to 0 to avoid prefetching on every thread dispatch.
|
||||
*/
|
||||
.BindingTableEntryCount = 1 + MIN2(cs_bin->bind_map.surface_count, 30),
|
||||
.BindingTableEntryCount = devinfo->verx10 == 125 ?
|
||||
0 : 1 + MIN2(pipeline->cs->bind_map.surface_count, 30),
|
||||
.BarrierEnable = cs_prog_data->uses_barrier,
|
||||
.SharedLocalMemorySize =
|
||||
encode_slm_size(GFX_VER, cs_prog_data->base.total_shared),
|
||||
|
Reference in New Issue
Block a user