summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntia Puentes <[email protected]>2015-06-16 23:48:46 +0200
committerJason Ekstrand <[email protected]>2015-08-03 09:40:48 -0700
commit0675842b56a956befbac4a3b912823e73a95a500 (patch)
tree7f5c34a2774946d9f2b8717f3a4d8e777355c265
parent4f39b547da4f9949d1b1f9f0df07d08951f0358d (diff)
i965/nir/vec4: Implement the addition operation
Adds NIR ALU operations: * nir_op_fadd * nir_op_iadd Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp7
1 files changed, 7 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 e1ada3bc855..db136c3e7ab 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -693,6 +693,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");
}