swrast: stop using MAX_WIDTH arrays in triangle code
authorBrian Paul <brianp@vmware.com>
Mon, 20 Feb 2012 03:08:52 +0000 (20:08 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 24 Feb 2012 15:03:05 +0000 (08:03 -0700)
src/mesa/swrast/s_triangle.c

index ddb4792f7e9d35321784e65f7e6963e7a3f07763..d1f622e2aa756bd8b266d63893b9cc9c41a2c311 100644 (file)
@@ -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++) {                                    \