From 0e5880ebe408367abe3d6c75d2b3e5344edaea49 Mon Sep 17 00:00:00 2001 From: Mel Henning Date: Tue, 27 May 2025 14:15:43 -0400 Subject: [PATCH] nvk: Call ensure_slm for nvk_cmd_dispatch_shader Internal shaders can also use slm, so we need to allocate it correctly. This fixes dEQP-VK.dgc.ext.compute.misc.max_pc_range_256_full_preprocess_with_execution_set with NAK_DEBUG=spill Fixes: 105bdf2e36 ("nvk: Add a helper for dispatching compute shaders") Reviewed-by: Faith Ekstrand Part-of: --- src/nouveau/vulkan/nvk_cmd_dispatch.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nouveau/vulkan/nvk_cmd_dispatch.c b/src/nouveau/vulkan/nvk_cmd_dispatch.c index e10f06195ab..015cf1aeaa2 100644 --- a/src/nouveau/vulkan/nvk_cmd_dispatch.c +++ b/src/nouveau/vulkan/nvk_cmd_dispatch.c @@ -305,6 +305,8 @@ nvk_cmd_dispatch_shader(struct nvk_cmd_buffer *cmd, uint32_t groupCountY, uint32_t groupCountZ) { + struct nvk_device *dev = nvk_cmd_buffer_device(cmd); + struct nvk_root_descriptor_table root = { .cs.group_count = { groupCountX, @@ -324,6 +326,11 @@ nvk_cmd_dispatch_shader(struct nvk_cmd_buffer *cmd, return; } + if (shader != NULL) { + nvk_device_ensure_slm(dev, shader->info.slm_size, + shader->info.crs_size); + } + struct nv_push *p = nvk_cmd_buffer_push(cmd, 8); /* Internal shaders don't want conditional rendering */