Mesa (master): i965/fs: Keep track of the register that hold delta_x/ delta_y.

Matt Turner mattst88 at kemper.freedesktop.org
Mon Aug 11 17:38:41 UTC 2014


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

Author: Matt Turner <mattst88 at gmail.com>
Date:   Sun Aug 10 19:03:34 2014 -0700

i965/fs: Keep track of the register that hold delta_x/delta_y.

They're needed in register allocation. Fixes a regression since
afe3d155.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78875
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index bf95b57..3aee822 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1749,6 +1749,20 @@ fs_visitor::compact_virtual_grfs()
             inst->src[i].reg = remap_table[inst->src[i].reg];
       }
    }
+
+   /* Patch all the references to delta_x/delta_y, since they're used in
+    * register allocation.
+    */
+   for (unsigned i = 0; i < ARRAY_SIZE(delta_x); i++) {
+      if (delta_x[i].file == GRF && remap_table[delta_x[i].reg] != -1) {
+         delta_x[i].reg = remap_table[delta_x[i].reg];
+      }
+   }
+   for (unsigned i = 0; i < ARRAY_SIZE(delta_y); i++) {
+      if (delta_y[i].file == GRF && remap_table[delta_y[i].reg] != -1) {
+         delta_y[i].reg = remap_table[delta_y[i].reg];
+      }
+   }
 }
 
 /*




More information about the mesa-commit mailing list