summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2016-05-25 13:17:41 -0700
committerFrancisco Jerez <[email protected]>2016-05-31 15:57:41 -0700
commit303ec22ed6124f7860de3856599ab4f02808b84b (patch)
tree16dea356461c92d270ee7d906f7167d612629de9 /src/mesa/drivers
parent4fe4f6e8a776acc60633809693e4135f5c894aa3 (diff)
i965/fs: Extend remove_duplicate_mrf_writes() to handle non-VGRF to MRF copies.
Cc: "12.0" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 5d5b98a12ad..00d937e30a7 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3112,18 +3112,18 @@ fs_visitor::remove_duplicate_mrf_writes()
}
/* Clear out any MRF move records whose sources got overwritten. */
- if (inst->dst.file == VGRF) {
- for (unsigned int i = 0; i < ARRAY_SIZE(last_mrf_move); i++) {
- if (last_mrf_move[i] &&
- last_mrf_move[i]->src[0].nr == inst->dst.nr) {
- last_mrf_move[i] = NULL;
- }
- }
+ for (unsigned i = 0; i < ARRAY_SIZE(last_mrf_move); i++) {
+ if (last_mrf_move[i] &&
+ regions_overlap(inst->dst, inst->regs_written * REG_SIZE,
+ last_mrf_move[i]->src[0],
+ last_mrf_move[i]->regs_read(0) * REG_SIZE)) {
+ last_mrf_move[i] = NULL;
+ }
}
if (inst->opcode == BRW_OPCODE_MOV &&
inst->dst.file == MRF &&
- inst->src[0].file == VGRF &&
+ inst->src[0].file != ARF &&
!inst->is_partial_write()) {
last_mrf_move[inst->dst.nr] = inst;
}