summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/matrix.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2011-09-07 17:44:28 -0700
committerPaul Berry <stereotype441@gmail.com>2011-09-20 14:51:03 -0700
commit27bdc76eb92b11bcd61b829bd1372866cb9ef304 (patch)
tree7dcfb46b9415d38156b7c4a1394f6b5a2b1aacc2 /src/mesa/main/matrix.c
parentc773de133aaf9e83f236ba0a06caf37b100bb1d5 (diff)
downloadexternal_mesa3d-27bdc76eb92b11bcd61b829bd1372866cb9ef304.zip
external_mesa3d-27bdc76eb92b11bcd61b829bd1372866cb9ef304.tar.gz
external_mesa3d-27bdc76eb92b11bcd61b829bd1372866cb9ef304.tar.bz2
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 <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
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 5697366..f479a22 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;