i965/vec4: Implement nir_op_uadd_sat
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 8 Oct 2018 22:33:10 +0000 (17:33 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 13 Dec 2018 17:49:48 +0000 (17:49 +0000)
Reviewed-by: Ian Romanick ian.d.romanick@intel.com
src/intel/compiler/brw_vec4_nir.cpp

index 4f97e96afa84a26d70dcddc1029b7616e010ed6d..26dc3110e2c14b3f24c9ca797fc3a79a5ef57cd6 100644 (file)
@@ -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;