summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2015-03-19 15:08:16 +0200
committerFrancisco Jerez <[email protected]>2015-03-23 14:13:00 +0200
commitce030a63993f7192c6aa4c5b9180f9543a6a76bc (patch)
tree7a27f191b590d942e669eb83175e406a6dffb670 /src/mesa/drivers
parent1db9c0cd0c0f4a1a0a4409e4c90cd0f0d0bce68d (diff)
i965/vec4: Don't lose the force_writemask_all flag during CSE.
And set it in the MOV instructions that copy the temporary to the original destination if the generator instruction had it set. Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_cse.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
index 0a687313a4e..31c01d60997 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
@@ -114,6 +114,7 @@ instructions_match(vec4_instruction *a, vec4_instruction *b)
a->conditional_mod == b->conditional_mod &&
a->dst.type == b->dst.type &&
a->dst.writemask == b->dst.writemask &&
+ a->force_writemask_all == b->force_writemask_all &&
a->regs_written == b->regs_written &&
operands_match(a, b);
}
@@ -168,6 +169,8 @@ vec4_visitor::opt_cse_local(bblock_t *block)
for (unsigned i = 0; i < entry->generator->regs_written; ++i) {
vec4_instruction *copy = MOV(offset(entry->generator->dst, i),
offset(entry->tmp, i));
+ copy->force_writemask_all =
+ entry->generator->force_writemask_all;
entry->generator->insert_after(block, copy);
}