summaryrefslogtreecommitdiff
path: root/src/mesa/softpipe
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-05-24 14:36:02 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-05-24 14:36:02 -0600
commitf889ad21da2009f8d49d53a3fa03795e826fb56a (patch)
tree3cf3cedb5c2261d0b86324799138f76f4b38d80d /src/mesa/softpipe
parentb1dc66b7bd9b13498204c32182d0935d3a7d3eec (diff)
define, use SP_MAX_CLIP_PLANES
Diffstat (limited to 'src/mesa/softpipe')
-rw-r--r--src/mesa/softpipe/sp_state.h4
-rw-r--r--src/mesa/softpipe/state_tracker/st_atom_clip.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/softpipe/sp_state.h b/src/mesa/softpipe/sp_state.h
index d69f9cd164..f8521beed3 100644
--- a/src/mesa/softpipe/sp_state.h
+++ b/src/mesa/softpipe/sp_state.h
@@ -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;
};
diff --git a/src/mesa/softpipe/state_tracker/st_atom_clip.c b/src/mesa/softpipe/state_tracker/st_atom_clip.c
index 1a0d2c4053..710d6ffc84 100644
--- a/src/mesa/softpipe/state_tracker/st_atom_clip.c
+++ b/src/mesa/softpipe/state_tracker/st_atom_clip.c
@@ -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],