From a89755d179254d1c9be3f935f44ba5efece90cc1 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 7 Nov 2022 14:28:51 +0000 Subject: [PATCH] radv: fix task payload lowering when shared_memory_explicit_layout=true MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If shared_memory_explicit_layout=true, we would have skipped lowering task payload variables to explicit types. Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Part-of: --- src/amd/vulkan/radv_shader.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 598279abc0b..7a1e0e69d0a 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -1077,9 +1077,11 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_pipeline_ nir->info.stage == MESA_SHADER_MESH) var_modes |= nir_var_mem_task_payload; - if (!nir->info.shared_memory_explicit_layout) { + if (!nir->info.shared_memory_explicit_layout) NIR_PASS(_, nir, nir_lower_vars_to_explicit_types, var_modes, shared_var_info); - } + else if (var_modes & ~nir_var_mem_shared) + NIR_PASS(_, nir, nir_lower_vars_to_explicit_types, var_modes & ~nir_var_mem_shared, + shared_var_info); NIR_PASS(_, nir, nir_lower_explicit_io, var_modes, nir_address_format_32bit_offset); if (nir->info.zero_initialize_shared_memory && nir->info.shared_size > 0) { -- 2.34.1