From 477c44ba93986e9aa4feae20f7e3777586a50ed1 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 15 Apr 2026 11:21:09 +0200 Subject: [PATCH] radv: lower SHADER_RECORD_INDEX to non-uniform This fixes an issue with RADV and NVIDIA-RTX/Donut-Samples with heap support in vkd3d-proton. Backport-to: 26.1 Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_shader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 691ef4a2d86..da5914efebc 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -799,8 +799,12 @@ radv_shader_spirv_to_nir(struct radv_device *device, struct radv_shader_stage *s NIR_PASS(progress, nir, nir_lower_flrp, lower_flrp, false /* always precise */); if (stage->key.descriptor_heap) { + const vk_nir_lower_descriptor_heaps_options heap_options = { + .lower_shader_record_index_to_non_uniform = true, + }; + progress = false; - NIR_PASS(progress, nir, vk_nir_lower_descriptor_heaps, stage->layout.mapping, NULL, &embedded_samplers); + NIR_PASS(progress, nir, vk_nir_lower_descriptor_heaps, stage->layout.mapping, &heap_options, &embedded_samplers); if (progress) { NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_uniform | nir_var_image, NULL); NIR_PASS(_, nir, nir_opt_dce);