From 6aa93a7dd166c69dd380df875602f4af3714bb7f Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 10 Aug 2014 19:03:34 -0700 Subject: [PATCH] i965/fs: Keep track of the register that hold delta_x/delta_y. They're needed in register allocation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78875 --- 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 cfe2073..5b7ad67 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1769,6 +1769,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->file == GRF && remap_table[delta_x->reg] != -1) { + delta_x->reg = remap_table[delta_x->reg]; + } + } + for (unsigned i = 0; i < ARRAY_SIZE(delta_y); i++) { + if (delta_y->file == GRF && remap_table[delta_y->reg] != -1) { + delta_y->reg = remap_table[delta_y->reg]; + } + } } /* -- 1.8.5.5