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

Author: Georg Lehmann <[email protected]>
Date:   Thu Aug 11 14:12:33 2022 +0200

aco: Combine 16bit undef and constants instead of using s_pack.

Signed-off-by: Georg Lehmann <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18106>

---

 src/amd/compiler/aco_instruction_selection.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp 
b/src/amd/compiler/aco_instruction_selection.cpp
index d17a41d6c81..0cb4494804c 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -1420,6 +1420,8 @@ visit_alu_instr(isel_context* ctx, nir_alu_instr* instr)
                const_vals[idx] |= nir_src_as_uint(instr->src[i].src) << offset;
                continue;
             }
+            if (nir_src_is_undef(instr->src[i].src))
+               continue;
 
             if (offset != packed_size - instr->dest.dest.ssa.bit_size)
                elems[i] =

Reply via email to