intel/compiler: Put back saturate on [iu]add_sat opcodes
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 21 Apr 2020 23:06:54 +0000 (16:06 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Apr 2020 00:47:40 +0000 (00:47 +0000)
I deleted one too many inst->saturate = ... lines.  This one must stay.

Fixes: b7c47c4f7cf ("intel/compiler: Drop nir_lower_to_source_mods() and related handling.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4669>

src/intel/compiler/brw_fs_nir.cpp

index ebb467ca0e083c8a2e9d50080c1a5cbf78a42863..ddce70dd91f14806119967953e308a10f2c4b84b 100644 (file)
@@ -1250,6 +1250,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr,
    case nir_op_iadd_sat:
    case nir_op_uadd_sat:
       inst = bld.ADD(result, op[0], op[1]);
+      inst->saturate = true;
       break;
 
    case nir_op_isub_sat: