i965: Mark delta_x/y as BAD_FILE if remapped away completely.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 13 Sep 2014 00:45:30 +0000 (17:45 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 16 Sep 2014 07:46:46 +0000 (00:46 -0700)
commit78bd12619474e98503965541c61c5d7e9c408110
treec14649ed65ca9a9a06a0986b191d3a7769898e1e
parent7f6872d012e66b11b64179cd7c214d10d4ae55cd
i965: Mark delta_x/y as BAD_FILE if remapped away completely.

Commit afe3d1556f6b77031f7025309511a0eea2a3e8df (i965: Stop doing
remapping of "special" regs.) stopped remapping delta_x/delta_y, and
additionally stopped considering them always-live.  We later realized
delta_x was used in register allocaiton, so we actually needed to remap
it, which was fixed in commit 23d782067ae834ad53522b46638ea21c62e94ca3
(i965/fs: Keep track of the register that hold delta_x/delta_y.).

However, that commit didn't restore the "always consider it live" part.
If all the code using delta_x was eliminated, fs_visitor::delta_x would
be left pointing at its old register number.  Later code in register
allocation would handle that register number specially...even though it
wasn't actually delta_x.

To combat this, set delta_x/y to BAD_FILE if they're eliminated, and
check for that.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83127
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "10.3" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp