panfrost/midgard: Handle i2b constant
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 26 Mar 2019 04:36:58 +0000 (04:36 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 26 Mar 2019 23:36:09 +0000 (23:36 +0000)
Fixes
dEQP-GLES2.functional.shaders.conversions.scalar_to_scalar.int_to_bool_fragment

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/midgard_compile.c

index d6ed000859607bc2ec007d0da196ee5ebea52c50..3dd21d0390d5d1aeebd36019b9647c43dd7ca4f7 100644 (file)
@@ -1174,7 +1174,7 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 }
 
                 ins.alu.src2 = vector_alu_srco_unsigned(blank_alu_src_xxxx);
-        } else if (instr->op == nir_op_f2b32) {
+        } else if (instr->op == nir_op_f2b32 || instr->op == nir_op_i2b32) {
                 ins.ssa_args.inline_constant = false;
                 ins.ssa_args.src1 = SSA_FIXED_REGISTER(REGISTER_CONSTANT);
                 ins.has_constants = true;