diff options
author | Brian <[email protected]> | 2007-06-29 21:29:30 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-06-29 21:29:30 -0600 |
commit | 9dca42a4a10acbf1980c0f2eafb3e28e11ca1bf3 (patch) | |
tree | 719e67ae454bdc1cc0d6960926f0d89a5e2d6499 /src/mesa/swrast/s_span.c | |
parent | fb4f4e2d186fac24cafa5e637461042706d4a123 (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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index 4ab6e2e9fbf..f23272c2bee 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 |