Mesa (master): r600g: Don't negate result of ABS instruction

Dave Airlie airlied at kemper.freedesktop.org
Sun Feb 27 23:22:41 UTC 2011


Module: Mesa
Branch: master
Commit: b6d40213935da702570eca2c0861bd4b1d7f5254
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6d40213935da702570eca2c0861bd4b1d7f5254

Author: Fabian Bieler <der.fabe at gmx.net>
Date:   Fri Feb 25 10:11:37 2011 +0100

r600g: Don't negate result of ABS instruction

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/r600_shader.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 13ccc3f..cc4491c 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1014,6 +1014,8 @@ static int tgsi_op2_s(struct r600_shader_ctx *ctx, int swap)
 			break;
 		case TGSI_OPCODE_ABS:
 			alu.src[0].abs = 1;
+			/* negation is performed after absolute value is taken */
+			alu.src[0].neg = 0;
 			break;
 		default:
 			break;




More information about the mesa-commit mailing list