[Mesa-dev] [PATCH 07/11] i965/vec4: Don't lose the force_writemask_all flag during CSE.

Francisco Jerez currojerez at riseup.net
Fri Mar 20 07:50:42 PDT 2015


And set it in the MOV instructions that copy the temporary to the
original destination if the generator instruction had it set.
---
 src/mesa/drivers/dri/i965/brw_vec4_cse.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
index 596300b..b0e70ba 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_cse.cpp
@@ -116,6 +116,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);
 }
@@ -170,6 +171,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);
                }
 
-- 
2.1.3



More information about the mesa-dev mailing list