i965/vec4: Don't lose copy propagation saturate bits for not written components.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 18 Mar 2015 13:45:16 +0000 (15:45 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 23 Mar 2015 12:09:33 +0000 (14:09 +0200)
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index 036706c6ef5fd1c7f62ac44b9939583a4ab6f620..a1050bb1333bc51bc776c5e628d8a009ba774907 100644 (file)
@@ -437,7 +437,7 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop)
          * the new value, so clear it.
          */
         bool direct_copy = is_direct_copy(inst);
-        entries[reg].saturatemask = 0x0;
+         entries[reg].saturatemask &= ~inst->dst.writemask;
         for (int i = 0; i < 4; i++) {
            if (inst->dst.writemask & (1 << i)) {
                entries[reg].value[i] = direct_copy ? &inst->src[0] : NULL;