iris/xe: take the grids variable_shared_mem into account

This fixes OpenCL local memory kernel arguments.

Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34548>
(cherry picked from commit 7c78c76181)
This commit is contained in:
Karol Herbst 2025-04-16 11:38:35 +02:00 committed by Eric Engestrom
parent de59c4b553
commit 8780fd7da5
2 changed files with 4 additions and 3 deletions

View file

@ -354,7 +354,7 @@
"description": "iris/xe: take the grids variable_shared_mem into account",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -9107,15 +9107,16 @@ iris_upload_compute_walker(struct iris_context *ice,
}
}
uint32_t total_shared = shader->total_shared + grid->variable_shared_mem;
struct GENX(INTERFACE_DESCRIPTOR_DATA) idd = {};
idd.KernelStartPointer =
KSP(shader) + iris_cs_data_prog_offset(cs_data, dispatch.simd_size);
idd.NumberofThreadsinGPGPUThreadGroup = dispatch.threads;
idd.SharedLocalMemorySize =
intel_compute_slm_encode_size(GFX_VER, shader->total_shared);
intel_compute_slm_encode_size(GFX_VER, total_shared);
idd.PreferredSLMAllocationSize =
intel_compute_preferred_slm_calc_encode_size(devinfo,
shader->total_shared,
total_shared,
dispatch.group_size,
dispatch.simd_size);
idd.SamplerStatePointer = shs->sampler_table.offset;