Mesa (master): i965/fs: Fix vgrf0 live interval when no interpolation was done.

Eric Anholt anholt at kemper.freedesktop.org
Tue Apr 8 08:24:36 UTC 2014


Module: Mesa
Branch: master
Commit: caa2605db52da7303c4571bddc424a613786f56f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=caa2605db52da7303c4571bddc424a613786f56f

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Mar 26 10:06:53 2014 -0700

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 at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp |    6 ++++--
 1 file 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 6151729..c7b1f25 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++;
    }
 




More information about the mesa-commit mailing list