r600g: fix glsl-fs-abs-neg
authorDave Airlie <airlied@redhat.com>
Sun, 24 Apr 2011 01:04:46 +0000 (11:04 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 24 Apr 2011 01:04:46 +0000 (11:04 +1000)
the hw does neg after abs, so don't neg the source in the ABS instruction case.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 188cea0..2f901be 100644 (file)
@@ -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;