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 036706c..a1050bb 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;