Mesa (master): i965/fs: Fix split_virtual_grfs() when delta_xy not in a virtual register.

Paul Berry stereotype441 at kemper.freedesktop.org
Fri Oct 28 00:08:48 UTC 2011


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

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Oct 21 14:16:25 2011 -0700

i965/fs: Fix split_virtual_grfs() when delta_xy not in a virtual register.

This patch modifies the special case in
fs_visitor::split_virtual_grfs() that prevents splitting from being
applied to the delta_x/delta_y register pair (this register pair needs
to remain contiguous so that it can be used by the PLN instruction).

When gen>=6, this register pair is in a fixed location, not a virtual
register, so it was in no danger of being split.  And
split_virtual_grfs' attempt not to split it was preventing some other
unrelated register from being split.

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index c0d93c0..3848915 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -768,7 +768,7 @@ fs_visitor::split_virtual_grfs()
 	 split_grf[i] = false;
    }
 
-   if (brw->has_pln) {
+   if (brw->has_pln && this->delta_x.file == GRF) {
       /* PLN opcodes rely on the delta_xy being contiguous. */
       split_grf[this->delta_x.reg] = false;
    }




More information about the mesa-commit mailing list