i965/fs: Implement nir_op_uadd_sat
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 6 Oct 2018 02:04:47 +0000 (21:04 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 13 Dec 2018 17:49:48 +0000 (17:49 +0000)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp

index d5a05aacdf5b932c0ca60f2571d7327adde4a7ce..6d70d744002730d3b5d1445964bb475f8195f68c 100644 (file)
@@ -982,6 +982,11 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
       inst->saturate = instr->dest.saturate;
       break;
 
+   case nir_op_uadd_sat:
+      inst = bld.ADD(result, op[0], op[1]);
+      inst->saturate = true;
+      break;
+
    case nir_op_fmul:
       inst = bld.MUL(result, op[0], op[1]);
       inst->saturate = instr->dest.saturate;