i965/vs: When MOVing to produce ABS, strip negate of the operand.
authorEric Anholt <eric@anholt.net>
Wed, 12 Jan 2011 17:40:05 +0000 (09:40 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 12 Jan 2011 17:50:34 +0000 (09:50 -0800)
We were returning the negative absolute value, instead of the absolute
value.  Fixes glsl-vs-abs-neg.

src/mesa/drivers/dri/i965/brw_vs_emit.c

index fe9737d043a833f676f63186da221c4971f06839..0411ce0b36c4957be58496d75b28452b4dc61f38 100644 (file)
@@ -1942,6 +1942,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
 
       switch (inst->Opcode) {
       case OPCODE_ABS:
+        args[0].negate = false;
         brw_MOV(p, dst, brw_abs(args[0]));
         break;
       case OPCODE_ADD: