Module: Mesa
Branch: main
Commit: 28b79b2ea5d13f2499d78f903a335383bb38e5c1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=28b79b2ea5d13f2499d78f903a335383bb38e5c1

Author: Gert Wollny <gert.wol...@collabora.com>
Date:   Thu Nov  2 21:39:42 2023 +0100

r600/sfn: Fixup component count only if intrinsic has it

Fixes: 33d878e
   r600/sfn: Handle load_global in 64 to vec2 lowering

Signed-off-by: Gert Wollny <gert.wol...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24229>

---

 src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp 
b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp
index 6c82843ee51..b11c98c500a 100644
--- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp
@@ -1026,7 +1026,8 @@ Lower64BitToVec2::load_64_to_vec2(nir_intrinsic_instr 
*intr)
    intr->num_components *= 2;
    intr->def.bit_size = 32;
    intr->def.num_components *= 2;
-   nir_intrinsic_set_component(intr, nir_intrinsic_component(intr) * 2);
+   if (nir_intrinsic_has_component(intr))
+      nir_intrinsic_set_component(intr, nir_intrinsic_component(intr) * 2);
    return NIR_LOWER_INSTR_PROGRESS;
 }
 

Reply via email to