summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-06-21 16:04:02 -0600
committerBrian <[email protected]>2007-06-21 16:06:27 -0600
commit93becd8a18f6ccf2f86e506ee36fc0bb75787c29 (patch)
tree060f14d0719fab2b1f00aa57755241ac7160239b /src/mesa/swrast/s_span.c
parented5ed6fe2f64f45eb3a43f9c57037d9e9b7fa5ea (diff)
fix rgba pointer bug hit on zoomed+fogged glDrawPixels
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 431629efb1f..9777391ded2 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1150,6 +1150,7 @@ convert_color_type(SWspan *span, GLenum newType, GLuint output)
span->end, span->array->mask);
span->array->ChanType = newType;
+ span->array->rgba = dst;
}
@@ -1234,7 +1235,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
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;
@@ -1456,7 +1458,8 @@ end:
span->interpMask = origInterpMask;
span->arrayMask = origArrayMask;
span->arrayAttribs = origArrayAttribs;
- span->array->ChanType = chanType;
+ span->array->ChanType = origChanType;
+ span->array->rgba = origRgba;
}