[Mesa-dev] [PATCH] swrast: Fix vertex color in _swsetup_Translate()
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Apr 23 08:09:22 PDT 2014
On Wed, Apr 23, 2014 at 08:40:22AM -0600, Brian Paul wrote:
> On 04/23/2014 08:18 AM, ville.syrjala at linux.intel.com wrote:
> > From: nick <nick at fuel7.com>
> >
> > Straightforward fix to properly load dest->color with color data, as
> > opposed to position data as previously implemented.
> >
> > [vsyrjala: I noticed the patch languishing in bugzilla.
> > It looks correct to me so I refreshed it for master.
> >
> > Looks like it's a regression introduced in:
> > commit a164d3aee063580503e5e9a77980059d52c486d7
> > Author: Brian <brian.paul at tungstengraphics.com>
> > Date: Fri Jul 6 16:51:19 2007 -0600
> >
> > In _swsetup_Translate(), update dest->attrib[FRAG_ATTRIB_COL0].]
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27499
> > Cc: Brian Paul <brianp at vmware.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> > src/mesa/swrast_setup/ss_context.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
> > index 12a4735..237f74c 100644
> > --- a/src/mesa/swrast_setup/ss_context.c
> > +++ b/src/mesa/swrast_setup/ss_context.c
> > @@ -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]);
> >
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> Do you need someone to commit this for you?
Yes please.
>
> Tag for stable branches?
Yeah that would seem appropriate. The offending commit has been there
since 7.2, but I guess 10.1 is the only still active stable branch?
--
Ville Syrjälä
Intel OTC
More information about the mesa-dev
mailing list