swrast: Fix vertex color in _swsetup_Translate()
authornick <nick@fuel7.com>
Wed, 23 Apr 2014 14:18:00 +0000 (08:18 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 24 Apr 2014 14:16:00 +0000 (08:16 -0600)
Straightforward fix to properly load dest->color with color data, as
opposed to position data as previously implemented.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27499
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/swrast_setup/ss_context.c

index 12a47358faf39af4f72b43c0e6906c4888d2c4e2..0b3b9e4dfbe40768b683e396c4f1c21cae626309 100644 (file)
@@ -287,7 +287,8 @@ _swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest )
 
    _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0,
                   dest->attrib[VARYING_SLOT_COL0] );
-   UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp );
+
+   UNCLAMPED_FLOAT_TO_RGBA_CHAN(dest->color, dest->attrib[VARYING_SLOT_COL0]);
 
    _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR1,
                   dest->attrib[VARYING_SLOT_COL1]);