Mesa (mesa_7_7_branch): swrast: use different temp array in _swrast_get_dest_rgba()

Brian Paul brianp at kemper.freedesktop.org
Thu Dec 31 15:45:23 UTC 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: 195e7657e2f15f7ad8b22042b86bcf33c5bba76b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=195e7657e2f15f7ad8b22042b86bcf33c5bba76b

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Dec 31 08:44:24 2009 -0700

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 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index d36c813..1a51d4f 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) {




More information about the mesa-commit mailing list