nir: Add b2b opcodes
[mesa.git] / src / compiler / nir / nir_lower_bool_to_int32.c
index 0978207e72d2a44ef6aab3576f197d0cab4f57b0..f3c343c444af4d59aff4640dadd2acc7684c909a 100644 (file)
@@ -65,6 +65,15 @@ lower_alu_instr(nir_alu_instr *alu)
    case nir_op_f2b1: alu->op = nir_op_f2b32; break;
    case nir_op_i2b1: alu->op = nir_op_i2b32; break;
 
+   case nir_op_b2b32:
+   case nir_op_b2b1:
+      /* We're mutating instructions in a dominance-preserving order so our
+       * source boolean should be 32-bit by now.
+       */
+      assert(nir_src_bit_size(alu->src[0].src) == 32);
+      alu->op = nir_op_mov;
+      break;
+
    case nir_op_flt: alu->op = nir_op_flt32; break;
    case nir_op_fge: alu->op = nir_op_fge32; break;
    case nir_op_feq: alu->op = nir_op_feq32; break;