From: Jason Ekstrand Date: Mon, 8 Oct 2018 22:33:10 +0000 (-0500) Subject: i965/vec4: Implement nir_op_uadd_sat X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=455ec7327da4a806d87d6dc8cee39a6c2853a8a3;p=mesa.git i965/vec4: Implement nir_op_uadd_sat Reviewed-by: Ian Romanick ian.d.romanick@intel.com --- 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;