From e13074d76312ca95648460629aef7021ee7482d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Wed, 1 Feb 2023 01:02:09 +0100 Subject: [PATCH] radv: Call nir_lower_array_deref_of_vec in radv_lower_io_to_scalar_early. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes an issue when a vector component of an arrayed output has a deref. Signed-off-by: Timur Kristóf Reviewed-by: Rhys Perry Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8197 Part-of: --- src/amd/vulkan/radv_pipeline.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index c83b7c879f1..759b6049853 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1734,6 +1734,10 @@ radv_lower_io_to_scalar_early(nir_shader *nir, nir_variable_mode mask) { bool progress = false; + NIR_PASS(progress, nir, nir_lower_array_deref_of_vec, mask, + nir_lower_direct_array_deref_of_vec_load | nir_lower_indirect_array_deref_of_vec_load | + nir_lower_direct_array_deref_of_vec_store | + nir_lower_indirect_array_deref_of_vec_store); NIR_PASS(progress, nir, nir_lower_io_to_scalar_early, mask); if (progress) { /* Optimize the new vector code and then remove dead vars */