From f14199a8fb802f6672d559fa958a5ee84e3e13f1 Mon Sep 17 00:00:00 2001 From: Antia Puentes Date: Wed, 17 Jun 2015 09:07:20 +0200 Subject: [PATCH] i965/nir/vec4: Implement logical operators Adds NIR ALU operations: * nir_op_inot * nir_op_ixor * nir_op_ior * nir_op_iand Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index 3ee7ac29333..549ed1ba5dc 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -989,6 +989,22 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr) break; } + case nir_op_inot: + emit(NOT(dst, op[0])); + break; + + case nir_op_ixor: + emit(XOR(dst, op[0], op[1])); + break; + + case nir_op_ior: + emit(OR(dst, op[0], op[1])); + break; + + case nir_op_iand: + emit(AND(dst, op[0], op[1])); + break; + default: unreachable("Unimplemented ALU operation"); } -- 2.30.2