iris: Fix doubling of shared local memory (SLM) sizes.
Commit 67ee9c5f55
added support for
using the `pipe_compute_state::req_local_mem` field, because Clover
can have a run-time specified size that isn't baked into the shaders.
However, it started adding the static size from the shader to the
dynamic state-supplied size. The Mesa state tracker fills out
req_local_mem to prog->Base.info.cs.shared_size, which is exactly
what we fill out prog_data->total_shared to be. Effectively, this
meant that we double-counted the same SLM requirements, doubling
our space requirements.
Fixes a 10% performance regression in Synmark2's OglCSDof test.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7152>
This commit is contained in:

committed by
Marge Bot

parent
341f5bffb7
commit
71ed8c5aa6
@@ -6742,12 +6742,9 @@ iris_upload_gpgpu_walker(struct iris_context *ice,
|
||||
IRIS_STAGE_DIRTY_CS)) {
|
||||
uint32_t desc[GENX(INTERFACE_DESCRIPTOR_DATA_length)];
|
||||
|
||||
unsigned slm_size = prog_data->total_shared;
|
||||
if (ish->kernel_shared_size)
|
||||
slm_size = ALIGN(slm_size, 8) + ish->kernel_shared_size;
|
||||
|
||||
iris_pack_state(GENX(INTERFACE_DESCRIPTOR_DATA), desc, idd) {
|
||||
idd.SharedLocalMemorySize = encode_slm_size(GEN_GEN, slm_size);
|
||||
idd.SharedLocalMemorySize =
|
||||
encode_slm_size(GEN_GEN, ish->kernel_shared_size);
|
||||
idd.KernelStartPointer =
|
||||
KSP(shader) + brw_cs_prog_data_prog_offset(cs_prog_data, simd_size);
|
||||
idd.SamplerStatePointer = shs->sampler_table.offset;
|
||||
|
Reference in New Issue
Block a user