mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
intel/compiler: handle b2i/b2f with other integer conversion opcodes
Since we handle booleans as integers this makes more sense. v2: - rebased to incorporate new boolean conversion opcodes v3: - rebased on top regioning lowering pass Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1) Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> (v2)
This commit is contained in:
parent
92f4761198
commit
66806405af
1 changed files with 8 additions and 8 deletions
|
|
@ -892,6 +892,14 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
|
|||
inst->saturate = instr->dest.saturate;
|
||||
break;
|
||||
|
||||
case nir_op_f2f64:
|
||||
case nir_op_f2i64:
|
||||
case nir_op_f2u64:
|
||||
assert(type_sz(op[0].type) > 2); /* brw_nir_lower_conversions */
|
||||
inst = bld.MOV(result, op[0]);
|
||||
inst->saturate = instr->dest.saturate;
|
||||
break;
|
||||
|
||||
case nir_op_b2i8:
|
||||
case nir_op_b2i16:
|
||||
case nir_op_b2i32:
|
||||
|
|
@ -904,14 +912,6 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
|
|||
op[0].type = BRW_REGISTER_TYPE_D;
|
||||
op[0].negate = !op[0].negate;
|
||||
/* fallthrough */
|
||||
case nir_op_f2f64:
|
||||
case nir_op_f2i64:
|
||||
case nir_op_f2u64:
|
||||
assert(type_sz(op[0].type) > 2); /* brw_nir_lower_conversions */
|
||||
inst = bld.MOV(result, op[0]);
|
||||
inst->saturate = instr->dest.saturate;
|
||||
break;
|
||||
|
||||
case nir_op_i2f64:
|
||||
case nir_op_i2i64:
|
||||
case nir_op_u2f64:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue