i965/vec4: Don't lose the saturate modifier in copy propagation.
authorAndrey Sudnik <andrey.sudnik@intel.com>
Thu, 5 Mar 2015 19:16:49 +0000 (11:16 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 5 Mar 2015 23:47:19 +0000 (15:47 -0800)
Cc: 10.4, 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89224
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp

index 679867c35512a8e2006b4c1a5a7a945422dff326..1f5e4f76cdd4d8c444f09b7236b9e9761889b9e3 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] = direct_copy ? &inst->src[0] : NULL;
+               entries[reg].value[i] = (!inst->saturate && direct_copy) ? &inst->src[0] : NULL;
                entries[reg].saturatemask |= (((inst->saturate && direct_copy) ? 1 : 0) << i);
            }
         }