define, use SP_MAX_CLIP_PLANES
authorBrian <brian.paul@tungstengraphics.com>
Thu, 24 May 2007 20:36:02 +0000 (14:36 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 24 May 2007 20:36:02 +0000 (14:36 -0600)
src/mesa/softpipe/sp_state.h
src/mesa/softpipe/state_tracker/st_atom_clip.c

index d69f9cd..f8521be 100644 (file)
@@ -81,8 +81,10 @@ struct softpipe_scissor_rect {
 };
 
 
+#define SP_MAX_CLIP_PLANES 6
+
 struct softpipe_clip_state {
-   GLfloat ucp[6][4];
+   GLfloat ucp[SP_MAX_CLIP_PLANES][4];
    GLuint nr;
 };
 
index 1a0d2c4..710d6ff 100644 (file)
@@ -45,7 +45,7 @@ static void update_clip( struct st_context *st )
 
    memset(&clip, 0, sizeof(clip));
 
-   for (i = 0; i < 6; i++) {
+   for (i = 0; i < SP_MAX_CLIP_PLANES; i++) {
       if (st->ctx->Transform.ClipPlanesEnabled & (1 << i)) {
         memcpy(clip.ucp[clip.nr], 
                st->ctx->Transform._ClipUserPlane[i],