ARB prog: Fix the order of swizzle application
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 30 Jul 2009 03:07:59 +0000 (20:07 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 30 Jul 2009 03:07:59 +0000 (20:07 -0700)
The swizzle used to generate the "original" value from the value
stored in the parameter array happens before the swizzle specified in
the instruction.  This fixes problems seen in progs/vp/vp-tris with arl-*.txt.

src/mesa/shader/prog_parameter_layout.c

index 4d67eca..8f2b306 100644 (file)
@@ -187,7 +187,7 @@ _mesa_layout_parameters(struct asm_parser_state *state)
               _mesa_add_unnamed_constant(layout, v, p->Size, & swizzle);
 
            inst->Base.SrcReg[i].Swizzle = 
-              _mesa_combine_swizzles(inst->Base.SrcReg[i].Swizzle, swizzle);
+              _mesa_combine_swizzles(swizzle, inst->Base.SrcReg[i].Swizzle);
            break;
         }