[Mesa-dev] [PATCH 28/78] i965/nir/vec4: Implement the addition operation
Eduardo Lima Mitev
elima at igalia.com
Fri Jun 26 01:06:44 PDT 2015
From: Antia Puentes <apuentes at igalia.com>
Adds NIR ALU operations:
* nir_op_fadd
* nir_op_iadd
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89580
---
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index eabfa39..3f2de9e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -736,6 +736,13 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
inst = emit(MOV(dst, op[0]));
break;
+ case nir_op_fadd:
+ /* fall through */
+ case nir_op_iadd:
+ inst = emit(ADD(dst, op[0], op[1]));
+ inst->saturate = instr->dest.saturate;
+ break;
+
default:
unreachable("Unimplemented ALU operation");
}
--
2.1.4
More information about the mesa-dev
mailing list