From 8780fd7da5f9ff855d1cd5b221ff332b7bad3451 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 16 Apr 2025 11:38:35 +0200 Subject: [PATCH] iris/xe: take the grids variable_shared_mem into account This fixes OpenCL local memory kernel arguments. Cc: mesa-stable Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 7c78c76181db01790163a1b720fbf1137b2b3499) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_state.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0461b0dbd43..89b9b53a9ab 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 5ede6dd089c..072776d1909 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -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;