[Mesa-dev] [PATCH 06/23] swrast: stop using MAX_WIDTH arrays in triangle code

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


From: Brian Paul <brianp at vmware.com>

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

diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index ddb4792..d1f622e 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++) {					\
-- 
1.7.3.4



More information about the mesa-dev mailing list