Mesa (master): i965/fs: Don' t propagate saturation modifiers if there are source modifiers.
Matt Turner
mattst88 at kemper.freedesktop.org
Sat Apr 5 16:46:27 UTC 2014
Module: Mesa
Branch: master
Commit: 92d03f7f2878b15a41077e1ea11962a47c1d9b29
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=92d03f7f2878b15a41077e1ea11962a47c1d9b29
Author: Matt Turner <mattst88 at gmail.com>
Date: Thu Apr 3 13:57:44 2014 -0700
i965/fs: Don't propagate saturation modifiers if there are source modifiers.
Which would lead to translating
mad vgrf9:F, vgrf3:F, u0:F, vgrf6:F
mov.sat vgrf7:F, -vgrf9:F
into
mad.sat vgrf9:F, vgrf3:F, u0:F, vgrf6:F
mov vgrf7:F, -vgrf9:F
Fixes some lighting effects in Dota2.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76749
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
index 4f3dcff..35e6774 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp
@@ -42,6 +42,8 @@ opt_saturate_propagation_local(fs_visitor *v, bblock_t *block)
if (inst->opcode != BRW_OPCODE_MOV ||
inst->dst.file != GRF ||
inst->src[0].file != GRF ||
+ inst->src[0].abs ||
+ inst->src[0].negate ||
!inst->saturate)
continue;
More information about the mesa-commit
mailing list