nir: add missing vec opcodes in lower_bool_to_float
authorJonathan Marek <jonathan@marek.ca>
Tue, 29 Jan 2019 14:09:07 +0000 (09:09 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 5 Feb 2019 15:34:15 +0000 (15:34 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_bool_to_float.c

index 52fc55c6b4c78472ed5a04d0145242f040027cdf..b1d7e4493e97b2fb455bede7821f9afa00577835 100644 (file)
@@ -52,6 +52,12 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu)
    /* Replacement SSA value */
    nir_ssa_def *rep = NULL;
    switch (alu->op) {
+   case nir_op_vec2:
+   case nir_op_vec3:
+   case nir_op_vec4:
+      /* These we expect to have booleans but the opcode doesn't change */
+      break;
+
    case nir_op_b2f32: alu->op = nir_op_fmov; break;
    case nir_op_b2i32: alu->op = nir_op_fmov; break;
    case nir_op_f2b1: