summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-04-13 19:21:58 +0000
committerBrian Paul <[email protected]>2006-04-13 19:21:58 +0000
commitda238ee06a8d169eb590aa5e50998136f1b5aba5 (patch)
tree5900bcd798bb50b2ba4582f828624fde8df49baf /src/mesa/main/get.c
parent564b2aa2ef8d5b859bb51d39024373a4865e93e9 (diff)
Fix comment about MaxTextureUnits, needs to be min of coord and image units.
See bug 5994. Also add a few assertions. Use MaxTextureUnits in get.c code. There's probably other places where we need to clean-up the usage of the MaxTexture[Coord/Image]Units constants.
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7147c9a5ccc..9b322908d11 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1040,7 +1040,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_MAX_TEXTURE_UNITS_ARB:
CHECK_EXT1(ARB_multitexture, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MIN2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits));
+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxTextureUnits);
break;
case GL_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetBooleanv");
@@ -2858,7 +2858,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_MAX_TEXTURE_UNITS_ARB:
CHECK_EXT1(ARB_multitexture, "GetFloatv");
- params[0] = (GLfloat)(MIN2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits));
+ params[0] = (GLfloat)(ctx->Const.MaxTextureUnits);
break;
case GL_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetFloatv");
@@ -4676,7 +4676,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_MAX_TEXTURE_UNITS_ARB:
CHECK_EXT1(ARB_multitexture, "GetIntegerv");
- params[0] = MIN2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits);
+ params[0] = ctx->Const.MaxTextureUnits;
break;
case GL_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetIntegerv");