intel/fs: Don't copy propagate from saturate to sel
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 23 Mar 2023 21:19:29 +0000 (14:19 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Mar 2023 23:48:19 +0000 (23:48 +0000)
commit782de1932c84a27e25e1fcf593228f7bcaf248e4
tree9910325fbb6fb1878a6ddda9dc9c44bea6400e09
parent125ecd7e2d757131ef984da286d32950aa6d6228
intel/fs: Don't copy propagate from saturate to sel

There are already NIR algebraic optimizations (see also ac6646129f7
("nir: Move fsat outside of fmin/fmax if second arg is 0 to 1.") that
will try to remove the saturate from things like

    fmax(0.5, fsat(x))

This basically reverts 40aeb558ce8 ("i965/fs: Allow propagation of
instructions with saturate flag to sel"). That commit message had no
shader-db information, so it's unclear whether this actually helped
anything ever.

No shader-db changes on any Intel platform.

One shader in Far Cry New Dawn was affected.

Cycles in all programs: 10933090738 -> 10933090736 (-0.0%)
Cycles helped: 1

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22169>
src/intel/compiler/brw_fs_copy_propagation.cpp
src/intel/compiler/test_fs_copy_propagation.cpp