From 34b8ef8f7e1a136700c3278f7b057ff3957dddcc Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 30 May 2025 13:02:39 -0400 Subject: [PATCH] hk: stop reserving pile of uniform regs for literally no reason Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/vulkan/hk_shader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/asahi/vulkan/hk_shader.c b/src/asahi/vulkan/hk_shader.c index 32b124d98ac..bf8c256d31e 100644 --- a/src/asahi/vulkan/hk_shader.c +++ b/src/asahi/vulkan/hk_shader.c @@ -979,8 +979,12 @@ hk_compile_nir(struct hk_device *dev, const VkAllocationCallbacks *pAllocator, #endif struct agx_shader_key backend_key = { + /* the image heap is always the last fixed uniform, so we can start + * preamble after that. + */ + .reserved_preamble = f.image_heap + 4, + .dev = agx_gather_device_key(&dev->dev), - .reserved_preamble = 128 /* TODO */, .no_stop = nir->info.stage == MESA_SHADER_FRAGMENT, .has_scratch = !nir->info.internal, .promote_constants = true,