[Mesa-dev] [PATCH v2 44/78] i965/nir/vec4: Implement logical operators
Eduardo Lima Mitev
elima at igalia.com
Thu Jul 23 03:17:24 PDT 2015
From: Antia Puentes <apuentes at igalia.com>
Adds NIR ALU operations:
* nir_op_inot
* nir_op_ixor
* nir_op_ior
* nir_op_iand
---
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 8810096..49fd429 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -992,6 +992,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.1.4
More information about the mesa-dev
mailing list