Module: Mesa
Branch: master
Commit: aa581fcc696f936d337946ed53d49ce90c3423d1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa581fcc696f936d337946ed53d49ce90c3423d1

Author: Jesse Natalie <[email protected]>
Date:   Mon Jun  1 15:46:03 2020 -0700

nir: Support vec8/vec16 in nir_lower_bit_size

Reviewed-by: Gert Wollny <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6030>

---

 src/compiler/nir/nir_lower_bit_size.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_lower_bit_size.c 
b/src/compiler/nir/nir_lower_bit_size.c
index 38e3fa9c6c0..a6a2032b010 100644
--- a/src/compiler/nir/nir_lower_bit_size.c
+++ b/src/compiler/nir/nir_lower_bit_size.c
@@ -39,7 +39,7 @@ lower_instr(nir_builder *bld, nir_alu_instr *alu, unsigned 
bit_size)
    bld->cursor = nir_before_instr(&alu->instr);
 
    /* Convert each source to the requested bit-size */
-   nir_ssa_def *srcs[4] = { NULL, NULL, NULL, NULL };
+   nir_ssa_def *srcs[NIR_MAX_VEC_COMPONENTS] = { NULL };
    for (unsigned i = 0; i < nir_op_infos[op].num_inputs; i++) {
       nir_ssa_def *src = nir_ssa_for_alu_src(bld, alu, i);
 
@@ -65,7 +65,7 @@ lower_instr(nir_builder *bld, nir_alu_instr *alu, unsigned 
bit_size)
       else
          lowered_dst = nir_ishr(bld, lowered_dst, nir_imm_int(bld, 
dst_bit_size));
    } else {
-      lowered_dst = nir_build_alu(bld, op, srcs[0], srcs[1], srcs[2], srcs[3]);
+      lowered_dst = nir_build_alu_src_arr(bld, op, srcs);
    }
 
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to