Mesa (7.10): i965/fs: When producing ir_unop_abs of an operand, strip negate.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Jan 18 20:14:40 UTC 2011
Module: Mesa
Branch: 7.10
Commit: e15ad414d0f75beac497429f4db7b33ea12c5ea8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e15ad414d0f75beac497429f4db7b33ea12c5ea8
Author: Eric Anholt <eric at anholt.net>
Date: Wed Jan 12 09:37:07 2011 -0800
i965/fs: When producing ir_unop_abs of an operand, strip negate.
We were returning the negative absolute value, instead of the absolute
value. Fixes glsl-fs-abs-neg.
(cherry picked from commit ab56e3be9aae54602372427755305c354821e105)
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 22e6e2e..3f5a7c2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -859,6 +859,7 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_unop_abs:
op[0].abs = true;
+ op[0].negate = false;
this->result = op[0];
break;
case ir_unop_sign:
More information about the mesa-commit
mailing list