OSDN Git Service

intel/fs: Fix opt_peephole_csel to not throw away saturates.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Mar 2019 02:00:21 +0000 (19:00 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 14 Mar 2019 19:07:30 +0000 (19:07 +0000)
commita1c6be2ab64b3c9617e91444287ef913a8cc5609
tree7d06861e4710a10101b697ad422d8e1de10fdfcc
parent92ad8814ac350019f71a21db54e2b264b8a7766d
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@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 3570d15b6d88bdcd353b31ffe5460d04a88b7b6f)
src/intel/compiler/brw_fs.cpp