Revert "i965/vec4: Don't lose the saturate modifier in copy propagation."
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 18 Mar 2015 13:39:03 +0000 (15:39 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 23 Mar 2015 12:09:33 +0000 (14:09 +0200)
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.

Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index ea1732d0bf66f3faf5f94abefadcfeb7c569850d..036706c6ef5fd1c7f62ac44b9939583a4ab6f620 100644 (file)
@@ -440,7 +440,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);
            }
         }