From 455ec7327da4a806d87d6dc8cee39a6c2853a8a3 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 8 Oct 2018 17:33:10 -0500 Subject: [PATCH] i965/vec4: Implement nir_op_uadd_sat Reviewed-by: Ian Romanick ian.d.romanick@intel.com --- 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 4f97e96afa8..26dc3110e2c 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -1085,6 +1085,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.30.2