From fb1650b202822adf37baa7e51878311bb83dc976 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 19 Feb 2012 20:08:52 -0700 Subject: [PATCH] swrast: stop using MAX_WIDTH arrays in triangle code --- src/mesa/swrast/s_triangle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) { \ -- 2.30.2