summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-08-28 11:22:01 -0700
committerIan Romanick <ian.d.romanick@intel.com>2013-09-10 14:36:11 -0500
commitc0253baaa03a7c33d67f293511ca60567c4aeab6 (patch)
tree2b358c9d800af6af8140b6e15b356a8861b1c590
parent9dd4e1ef85edfc7a992a19b8678e9d6f8d7a6734 (diff)
downloadmesa-c0253baaa03a7c33d67f293511ca60567c4aeab6.tar.gz
mesa-c0253baaa03a7c33d67f293511ca60567c4aeab6.tar.bz2
mesa-c0253baaa03a7c33d67f293511ca60567c4aeab6.zip
i965/fs: Detect GRF sources in split_virtual_grfs send-from-GRF code.
It is incorrect to assume that src[0] of a SEND-from-GRF opcode is the GRF. For example, FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD uses src[1] for the GRF. To be safe, loop over all the source registers and mark any GRFs. We probably won't ever have more than one, but it's simpler to just check all three rather than attempting to bail early. Not observed to fix anything yet, but likely to. Parallels the bug fix in the previous commit, which actually does fix known failures. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit a35b32025011eeac01f2e5a476dbf3ac132a61b3)
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 3986bf5fe6e..62dccc1063e 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1358,7 +1358,11 @@ fs_visitor::split_virtual_grfs()
* the send is reading the whole thing.
*/
if (inst->is_send_from_grf()) {
- split_grf[inst->src[0].reg] = false;
+ for (int i = 0; i < 3; i++) {
+ if (inst->src[i].file == GRF) {
+ split_grf[inst->src[i].reg] = false;
+ }
+ }
}
}