[Mesa-dev] [PATCH v3 6/7] i965/vec4: Implement nir_op_uadd_sat
Jason Ekstrand
jason at jlekstrand.net
Mon Oct 29 15:00:12 UTC 2018
---
src/intel/compiler/brw_vec4_nir.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp
index 5ccfd1f8940..b0ee0f9720d 100644
--- a/src/intel/compiler/brw_vec4_nir.cpp
+++ b/src/intel/compiler/brw_vec4_nir.cpp
@@ -1230,6 +1230,12 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
inst->saturate = instr->dest.saturate;
break;
+ case nir_op_uadd_sat:
+ assert(nir_dest_bit_size(instr->dest.dest) < 64);
+ inst = emit(ADD(dst, op[0], op[1]));
+ inst->saturate = true;
+ break;
+
case nir_op_fmul:
inst = emit(MUL(dst, op[0], op[1]));
inst->saturate = instr->dest.saturate;
--
2.19.1
More information about the mesa-dev
mailing list