i965: Generalize the pixel_x/y workaround for all UW types.
authorEric Anholt <eric@anholt.net>
Tue, 6 May 2014 20:22:10 +0000 (13:22 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 12 May 2014 16:49:27 +0000 (09:49 -0700)
commit66f5c8df067ed014c98ef7cf21591e9ea0b5b6bb
tree3beb7a2c684716cdc5abc6e8d9a6a4a1e3ee7c03
parent11bef60d0932649bbbb95a3518d3b7de06dd2938
i965: Generalize the pixel_x/y workaround for all UW types.

This is the only case where a fs_reg in brw_fs_visitor is used during
optimization/code generation, and it meant that optimizations had to be
careful to not move pixel_x/y's register number without updating it.

Additionally, it turns out we had a couple of other UW values that weren't
getting this treatment (like gl_SampleID), so this more general fix is
probably a good idea (though I wasn't able to replicate problems with
either pixel_[xy]'s values or gl_SampleID, even when telling the register
allocator to reuse registers immediately)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp