i965/fs: Fix vgrf0 live interval when no interpolation was done.

When you've got a simple solid-color shader that doesn't generate
pixel_x/y interpolation, we were deciding that the first vgrf was both the
undefined pixel_x and pixel_y, and extending its live interval to avoid
the stride problem.  That tricked other optimization that tries to see if
a particular instruction is the last use of a variable.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt 2014-03-26 10:06:53 -07:00
parent cf40ebacb1
commit caa2605db5
1 changed files with 4 additions and 2 deletions

View File

@ -86,8 +86,10 @@ fs_live_variables::setup_one_read(bblock_t *block, fs_inst *inst,
*/
int end_ip = ip;
if (v->dispatch_width == 16 && (reg.stride == 0 ||
(v->pixel_x.reg == reg.reg ||
v->pixel_y.reg == reg.reg))) {
((v->pixel_x.file == GRF &&
v->pixel_x.reg == reg.reg) ||
(v->pixel_y.file == GRF &&
v->pixel_y.reg == reg.reg)))) {
end_ip++;
}