i965/fs: Do CSE on gen7's varying-index pull constant loads.
authorEric Anholt <eric@anholt.net>
Fri, 15 Mar 2013 21:43:28 +0000 (14:43 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 1 Apr 2013 23:17:25 +0000 (16:17 -0700)
commit9f43b8492818bab47ef9cc489b91c2618446a3e9
tree8bdf704ad0fc4a8eb9f3c8c7fc15cab30e4e3829
parentdca5fc14358a8b267b3854c39c976a822885898f
i965/fs: Do CSE on gen7's varying-index pull constant loads.

This is our first CSE on a regs_written() > 1 instruction, so it takes a
bit of extra fixup.  Reduces the number of loads on kwin's Lanczos shader
from 12 to 2.

v2: Fix compiler warning (false positive on possibly-uninitialized variable)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61554
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
NOTE: This is a candidate for the 9.1 branch.
src/mesa/drivers/dri/i965/brw_fs_cse.cpp