[Mesa-dev] [PATCH 09/14] vc4: adapt to new sized alu types

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Mar 7 08:46:06 UTC 2016


From: Iago Toral Quiroga <itoral at igalia.com>

CC: Eric Anholt <eric at anholt.net>
---
 src/gallium/drivers/vc4/vc4_program.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 5c91c02..6f27665 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -885,7 +885,10 @@ ntq_emit_comparison(struct vc4_compile *c, struct qreg *dest,
         struct qreg src0 = ntq_get_alu_src(c, compare_instr, 0);
         struct qreg src1 = ntq_get_alu_src(c, compare_instr, 1);
 
-        if (nir_op_infos[compare_instr->op].input_types[0] == nir_type_float)
+        unsigned unsized_type =
+                nir_op_infos[compare_instr->op].input_types[0] &
+                NIR_ALU_TYPE_BASE_TYPE_MASK;
+        if (unsized_type == nir_type_float)
                 qir_SF(c, qir_FSUB(c, src0, src1));
         else
                 qir_SF(c, qir_SUB(c, src0, src1));
-- 
2.7.0



More information about the mesa-dev mailing list