[Mesa-dev] [PATCH 52/78] i965/nir/vec4: Implement conditional select
Eduardo Lima Mitev
elima at igalia.com
Fri Jun 26 01:07:08 PDT 2015
From: Antia Puentes <apuentes at igalia.com>
Adds NIR ALU operations:
* nir_op_bcsel
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89580
---
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index abc6c4d..dda3bc1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1239,6 +1239,12 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
inst->saturate = instr->dest.saturate;
break;
+ case nir_op_bcsel:
+ emit(CMP(dst_null_d(), op[0], src_reg(0), BRW_CONDITIONAL_NZ));
+ inst = emit(BRW_OPCODE_SEL, dst, op[1], op[2]);
+ inst->predicate = BRW_PREDICATE_NORMAL;
+ break;
+
default:
unreachable("Unimplemented ALU operation");
}
--
2.1.4
More information about the mesa-dev
mailing list