Mesa (master): intel/compiler: Put back saturate on [iu]add_sat opcodes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 22 00:58:45 UTC 2020


Module: Mesa
Branch: master
Commit: 902c8731f4e16be4c66bb4280550a1c2d9d28537
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=902c8731f4e16be4c66bb4280550a1c2d9d28537

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Apr 21 16:06:54 2020 -0700

intel/compiler: Put back saturate on [iu]add_sat opcodes

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 at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4669>

---

 src/intel/compiler/brw_fs_nir.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index ebb467ca0e0..ddce70dd91f 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -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:



More information about the mesa-commit mailing list