From: Brian Paul Date: Mon, 20 Feb 2012 03:08:52 +0000 (-0700) Subject: swrast: stop using MAX_WIDTH arrays in triangle code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fb1650b202822adf37baa7e51878311bb83dc976;p=mesa.git swrast: stop using MAX_WIDTH arrays in triangle code --- diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index ddb4792f7e9..d1f622e2aa7 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -142,7 +142,7 @@ _swrast_culltriangle( struct gl_context *ctx, #define RENDER_SPAN( span ) \ GLuint i; \ - GLubyte rgba[MAX_WIDTH][4]; \ + GLubyte (*rgba)[4] = swrast->SpanArrays->rgba8; \ span.intTex[0] -= FIXED_HALF; /* off-by-one error? */ \ span.intTex[1] -= FIXED_HALF; \ for (i = 0; i < span.end; i++) { \ @@ -200,7 +200,7 @@ _swrast_culltriangle( struct gl_context *ctx, #define RENDER_SPAN( span ) \ GLuint i; \ - GLubyte rgba[MAX_WIDTH][4]; \ + GLubyte (*rgba)[4] = swrast->SpanArrays->rgba8; \ span.intTex[0] -= FIXED_HALF; /* off-by-one error? */ \ span.intTex[1] -= FIXED_HALF; \ for (i = 0; i < span.end; i++) { \