aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-03-26 10:06:53 -0700
committerEric Anholt <[email protected]>2014-04-08 00:59:48 -0700
commitcaa2605db52da7303c4571bddc424a613786f56f (patch)
tree0b99b40cd56e645cdecc747d225ce20e4e9dbf24 /src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
parentcf40ebacb113a370c1b2445e881f8dc440a7d8f3 (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
index 61517299247..c7b1f2513ab 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
@@ -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++;
}