diff options
author | Antia Puentes <[email protected]> | 2015-06-17 10:05:29 +0200 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-08-03 09:40:49 -0700 |
commit | 96106e2a9f214d98fc2e99c65398f95d41a3b879 (patch) | |
tree | 4d95ef0033ec16c085f74f152dbc2f20dba00b13 /src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | |
parent | b38fcd0aea8d17919ecd9cc7afc518cfb2c01c27 (diff) |
i965/nir/vec4: Implement conditional select
Adds NIR ALU operations:
* nir_op_bcsel
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_nir.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index 1ee85976793..529f7f73eae 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -1207,6 +1207,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"); } |