This is valid NIR but you can't actually hit this case today. GLSL IR
doesn't have a bool to double opcode; it does f2d(b2f(x)). In SPIR-V we
don't have any to/from bool conversion opcodes at all. However, the
next commit will make us start generating it so we should be ready.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
case nir_op_b2i:
case nir_op_b2f:
- emit(MOV(dst, negate(op[0])));
+ if (nir_dest_bit_size(instr->dest.dest) > 32) {
+ assert(dst.type == BRW_REGISTER_TYPE_DF);
+ emit_conversion_to_double(dst, negate(op[0]), false);
+ } else {
+ emit(MOV(dst, negate(op[0])));
+ }
break;
case nir_op_f2b: