[Mesa-dev] [PATCH 08/23] swrast: remove MAX_WIDTH array in s_span.c

Brian Paul brian.e.paul at gmail.com
Mon Feb 20 12:14:56 PST 2012


From: Brian Paul <brianp at vmware.com>

---
 src/mesa/swrast/s_span.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 025e7b2..5cdb8ed 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1319,7 +1319,8 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
          /* color[fragOutput] will be written to buffer[buf] */
 
          if (rb) {
-            GLchan rgbaSave[MAX_WIDTH][4];
+            /* re-use one of the attribute array buffers for rgbaSave */
+            GLchan (*rgbaSave)[4] = (GLchan (*)[4]) span->array->attribs[0];
             struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
             GLenum colorType = srb->ColorType;
 
-- 
1.7.3.4



More information about the mesa-dev mailing list