r600g: Don't negate result of ABS instruction
authorFabian Bieler <der.fabe@gmx.net>
Fri, 25 Feb 2011 09:11:37 +0000 (10:11 +0100)
committerDave Airlie <airlied@redhat.com>
Sun, 27 Feb 2011 23:21:41 +0000 (09:21 +1000)
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_shader.c

index 13ccc3f..cc4491c 100644 (file)
@@ -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;