summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2018-11-22 10:59:59 +0100
committerJuan A. Suarez Romero <[email protected]>2019-04-18 11:05:18 +0200
commit66806405afa02024813869d8cc972f293041fa50 (patch)
treec23f5262510ea727168d509a68e2b7a6d6b02153 /src
parent92f4761198d24fb73cbe5bcd12b0ebf5bb766b4d (diff)
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 <[email protected]> (v1) Reviewed-by: Topi Pohjolainen <[email protected]> (v2)
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 5add83b257d..2aaa473e698 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -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: