Mesa (staging/19.0): intel/fs: Fix opt_peephole_csel to not throw away saturates.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 13 17:03:59 UTC 2019


Module: Mesa
Branch: staging/19.0
Commit: fd7e4e1467b07e2be9701653a8ff4b5b1f6b0f5a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd7e4e1467b07e2be9701653a8ff4b5b1f6b0f5a

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Mar 11 19:00:21 2019 -0700

intel/fs: Fix opt_peephole_csel to not throw away saturates.

We were not copying the saturate bit from the original instruction
to the new replacement instruction.  This caused major misrendering
in DiRT Rally on iris, where comparisons leading to discards failed
due to the missing saturate, causing lots of extra garbage pixels to
be drawn in text rendering, trees, and so on.

This did not show up on i965 because st/nir performs a more aggressive
version of nir_opt_peephole_select, yielding more b32csel operations.

Fixes: 52c7df1643e i965/fs: Merge CMP and SEL into CSEL on Gen8+

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
(cherry picked from commit 3570d15b6d88bdcd353b31ffe5460d04a88b7b6f)

---

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

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index e1c9722cf96..4a14a3eb6e1 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -3117,6 +3117,7 @@ fs_visitor::opt_peephole_csel()
 
             if (csel_inst != NULL) {
                progress = true;
+               csel_inst->saturate = inst->saturate;
                inst->remove(block);
             }
 




More information about the mesa-commit mailing list