From 195e7657e2f15f7ad8b22042b86bcf33c5bba76b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 31 Dec 2009 08:44:24 -0700 Subject: swrast: use different temp array in _swrast_get_dest_rgba() When using multiple color drawbuffers with blending/logicop/masking we were overwriting color values which we still needed. --- src/mesa/swrast/s_span.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c index d36c8132f6..1a51d4f045 100644 --- a/src/mesa/swrast/s_span.c +++ b/src/mesa/swrast/s_span.c @@ -1766,9 +1766,7 @@ _swrast_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, /** - * Get RGBA pixels from the given renderbuffer. Put the pixel colors into - * the span's specular color arrays. The specular color arrays should no - * longer be needed by time this function is called. + * Get RGBA pixels from the given renderbuffer. * Used by blending, logicop and masking functions. * \return pointer to the colors we read. */ @@ -1779,10 +1777,8 @@ _swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, const GLuint pixelSize = RGBA_PIXEL_SIZE(span->array->ChanType); void *rbPixels; - /* - * Point rbPixels to a temporary space (use specular color arrays). - */ - rbPixels = span->array->attribs[FRAG_ATTRIB_COL1]; + /* Point rbPixels to a temporary space */ + rbPixels = span->array->attribs[FRAG_ATTRIB_MAX - 1]; /* Get destination values from renderbuffer */ if (span->arrayMask & SPAN_XY) { -- cgit v1.2.3