i965/fs: Try to avoid generating extra MOVs to do saturates.
authorEric Anholt <eric@anholt.net>
Sat, 10 Mar 2012 21:48:42 +0000 (13:48 -0800)
committerEric Anholt <eric@anholt.net>
Thu, 12 Apr 2012 01:08:21 +0000 (18:08 -0700)
commit32ae8d3b321185a85b73ff703d8fc26bd5f48fa7
treed26b5636eb9d17c2e5b88b8c9636add8c4745f17
parent3bdccbc3e0185fbca16eada2a76f55c6e3f867b5
i965/fs: Try to avoid generating extra MOVs to do saturates.

This change (before the previous two) produced a .23% +/- .11%
performance improvement in Unigine Tropics at 1024x768 on IVB.

Total instructions: 269270 -> 262649
614/2148 programs affected (28.6%)
179386 -> 172765 instructions in affected programs (3.7% reduction)

v2: Move some of the logic of finding the instruction that produced
    the result of an expression tree to a helper.
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp