summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/matrix.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-09-07 17:44:28 -0700
committerPaul Berry <[email protected]>2011-09-20 14:51:03 -0700
commit27bdc76eb92b11bcd61b829bd1372866cb9ef304 (patch)
tree7dcfb46b9415d38156b7c4a1394f6b5a2b1aacc2 /src/mesa/main/matrix.c
parentc773de133aaf9e83f236ba0a06caf37b100bb1d5 (diff)
mesa: Update clipping code to use ctx->Const.MaxClipPlanes.
To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8. To avoid breaking drivers that do not yet support 8 clip planes, this patch modifies the Mesa core code that pertains to clipping to use ctx->Const.MaxClipPlanes rather than MAX_CLIP_PLANES, since ctx->Const.MaxClipPlanes will remain 6 for drivers that only support 6 clip planes. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/matrix.c')
-rw-r--r--src/mesa/main/matrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 56973661cea..f479a22b073 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -776,7 +776,7 @@ void _mesa_init_transform( struct gl_context *ctx )
ctx->Transform.Normalize = GL_FALSE;
ctx->Transform.RescaleNormals = GL_FALSE;
ctx->Transform.RasterPositionUnclipped = GL_FALSE;
- for (i=0;i<MAX_CLIP_PLANES;i++) {
+ for (i=0;i<ctx->Const.MaxClipPlanes;i++) {
ASSIGN_4V( ctx->Transform.EyeUserPlane[i], 0.0, 0.0, 0.0, 0.0 );
}
ctx->Transform.ClipPlanesEnabled = 0;