[Mesa-dev] [PATCH 1/5] Revert "i965/vec4: Don't lose the saturate modifier in copy propagation."

Francisco Jerez currojerez at riseup.net
Fri Mar 20 07:16:13 PDT 2015


This reverts commit 0dfec59a2785cf7a87ee5128889ecebe810b611b.  The
change prevented propagation of copies with the saturate flag set,
making the whole saturate mask tracking completely useless.  A proper
fix follows.
---
 src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 9b7ebf9..8537fdd 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -441,7 +441,7 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop)
 	 entries[reg].saturatemask = 0x0;
 	 for (int i = 0; i < 4; i++) {
 	    if (inst->dst.writemask & (1 << i)) {
-               entries[reg].value[i] = (!inst->saturate && direct_copy) ? &inst->src[0] : NULL;
+               entries[reg].value[i] = direct_copy ? &inst->src[0] : NULL;
                entries[reg].saturatemask |= (((inst->saturate && direct_copy) ? 1 : 0) << i);
 	    }
 	 }
-- 
2.1.3



More information about the mesa-dev mailing list