summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-02-06 15:06:05 +0200
committerFrancisco Jerez <[email protected]>2015-02-23 20:55:40 +0200
commitea7b4d25c8da352f4ca0dcaefa4fadb9e202636e (patch)
tree3add7b413c7a4e19487bbe43fcc51d0eea618b2a
parent08b4c8f7bf2cc2fe914a07a32bf4961894593e72 (diff)
i965/fs: Fix lower_load_payload() to take into account non-zero reg_offset.
Fixes metadata guess when instructions in the program specify a destination register with non-zero reg_offset and when the payload of a LOAD_PAYLOAD spans several registers. Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index e396fbc0825..4fa67901757 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3127,7 +3127,7 @@ fs_visitor::lower_load_payload()
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
if (inst->dst.file == GRF) {
- const int dst_reg = vgrf_to_reg[inst->dst.reg];
+ const int dst_reg = vgrf_to_reg[inst->dst.reg] + inst->dst.reg_offset;
bool force_sechalf = inst->force_sechalf &&
!inst->force_writemask_all;
bool toggle_sechalf = inst->dst.width == 16 &&
@@ -3176,7 +3176,7 @@ fs_visitor::lower_load_payload()
}
if (dst.file == GRF) {
- const int dst_reg = vgrf_to_reg[dst.reg];
+ const int dst_reg = vgrf_to_reg[dst.reg] + dst.reg_offset;
const bool force_writemask = mov->force_writemask_all;
metadata[dst_reg].force_writemask_all = force_writemask;
metadata[dst_reg].force_sechalf = mov->force_sechalf;