/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
- /* for glDraw/CopyPixels() we may have turned off some bits in
- * the _ActiveAttribMask - be sure to obey that mask now.
+ /*
+ * Don't overwrite existing array values, such as colors that may have
+ * been produced by glDraw/CopyPixels.
*/
- attrMask &= swrast->_ActiveAttribMask;
+ attrMask &= ~span->arrayAttribs;
ATTRIB_LOOP_BEGIN
if (attrMask & (1 << attr)) {
v3 += dv3dx;
w += dwdx;
}
+ ASSERT((span->arrayAttribs & (1 << attr)) == 0);
span->arrayAttribs |= (1 << attr);
}
ATTRIB_LOOP_END
span->end, span->array->mask);
span->array->ChanType = newType;
+ span->array->rgba = dst;
}
if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) {
convert_color_type(span, GL_FLOAT, 0);
}
- interpolate_active_attribs(ctx, span, ~0);
+ if (span->primitive != GL_POINT) {
+ /* for points, we populated the arrays already */
+ interpolate_active_attribs(ctx, span, ~0);
+ }
span->array->ChanType = GL_FLOAT;
if (!(span->arrayMask & SPAN_Z))
const GLbitfield origInterpMask = span->interpMask;
const GLbitfield origArrayMask = span->arrayMask;
const GLbitfield origArrayAttribs = span->arrayAttribs;
- const GLenum chanType = span->array->ChanType;
+ const GLenum origChanType = span->array->ChanType;
+ void * const origRgba = span->array->rgba;
const GLboolean shader = (ctx->FragmentProgram._Current
|| ctx->ATIFragmentShader._Enabled);
const GLboolean shaderOrTexture = shader || ctx->Texture._EnabledUnits;
span->interpMask = origInterpMask;
span->arrayMask = origArrayMask;
span->arrayAttribs = origArrayAttribs;
- span->array->ChanType = chanType;
+ span->array->ChanType = origChanType;
+ span->array->rgba = origRgba;
}