Mesa (master): r600g: fix glsl-fs-abs-neg

Dave Airlie airlied at kemper.freedesktop.org
Sat Apr 23 18:00:55 PDT 2011


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Sun Apr 24 11:04:46 2011 +1000

r600g: fix glsl-fs-abs-neg

the hw does neg after abs, so don't neg the source in the ABS instruction case.

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 188cea0..2f901be 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -911,6 +911,8 @@ static int tgsi_op2_s(struct r600_shader_ctx *ctx, int swap)
 			break;
 		case TGSI_OPCODE_ABS:
 			alu.src[0].abs = 1;
+			if (alu.src[0].neg)
+			  alu.src[0].neg = 0;
 			break;
 		default:
 			break;



More information about the mesa-commit mailing list