summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-06-29 21:29:30 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-06-29 21:29:30 -0600
commit9dca42a4a10acbf1980c0f2eafb3e28e11ca1bf3 (patch)
tree719e67ae454bdc1cc0d6960926f0d89a5e2d6499 /src/mesa/swrast/s_span.c
parentfb4f4e2d186fac24cafa5e637461042706d4a123 (diff)
Undo some prev glDraw/CopyPixel changes which fixed a bug in which colors were overwritten by interpolating attributes.
Now just set the span->arrayAttribs mask in glDraw/CopyPixels and be sure we don't overwrite the values in interpolate_active_attribs().
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 4ab6e2e9fb..f23272c2be 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -171,10 +171,11 @@ interpolate_active_attribs(GLcontext *ctx, SWspan *span, GLbitfield attrMask)
{
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)) {
@@ -201,6 +202,7 @@ interpolate_active_attribs(GLcontext *ctx, SWspan *span, GLbitfield attrMask)
v3 += dv3dx;
w += dwdx;
}
+ ASSERT((span->arrayAttribs & (1 << attr)) == 0);
span->arrayAttribs |= (1 << attr);
}
ATTRIB_LOOP_END