fix copy and paste bug from last commit in fog generation code for GL_LINEAR fog
authorRoland Scheidegger <sroland@tungstengraphics.com>
Wed, 21 Mar 2007 12:19:02 +0000 (13:19 +0100)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Wed, 21 Mar 2007 12:19:02 +0000 (13:19 +0100)
src/mesa/drivers/dri/i965/brw_vs_tnl.c

index e22a26b291741ef7c33664f542009ea6f17ea110..dd1664bf33ab2965d318d6d64b6aa926e206b8f4 100644 (file)
@@ -1174,8 +1174,8 @@ static void build_fog( struct tnl_program *p )
 
       switch (p->state->fog_option) {
       case FOG_LINEAR: {
-        emit_op3(p, OPCODE_MAD, tmp, 0, input, swizzle1(params,X), swizzle1(params,Y));
-        emit_op2(p, OPCODE_MUL, tmp, 0, tmp, swizzle1(params,W)); 
+        emit_op1(p, OPCODE_ABS, tmp, 0, input);
+        emit_op3(p, OPCODE_MAD, tmp, 0, tmp, swizzle1(params,X), swizzle1(params,Y));
         emit_op2(p, OPCODE_MAX, tmp, 0, tmp, swizzle1(id,X)); /* saturate */
         emit_op2(p, OPCODE_MIN, fog, WRITEMASK_X, tmp, swizzle1(id,W));
         break;