aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-12-31 08:44:24 -0700
committerBrian Paul <[email protected]>2009-12-31 08:44:27 -0700
commit195e7657e2f15f7ad8b22042b86bcf33c5bba76b (patch)
tree85a7fcdc4d4e49330a06cededfe2ad43b90e577d /src
parent6e0584932b3e556a0aecd2ca36f5ae41dc40a919 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_span.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index d36c8132f63..1a51d4f045c 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) {