diff options
author | Henri Verbeet <[email protected]> | 2011-07-04 00:57:42 +0200 |
---|---|---|
committer | Henri Verbeet <[email protected]> | 2011-07-07 20:30:13 +0200 |
commit | bfe284fd26e96b71c7cf46e6365b3697d68cde83 (patch) | |
tree | 1ffa83b8845f13530b02cfc1fdb1edc8002cd8ba /src/mesa/main/texenv.c | |
parent | 47441956284b3e22df2ee8500667617d2880bfc8 (diff) |
mesa: Fix a couple of TexEnv unit limits.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Henri Verbeet <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texenv.c')
-rw-r--r-- | src/mesa/main/texenv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 9228e354a4d..c0d0f3779b2 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -419,7 +419,7 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) ASSERT_OUTSIDE_BEGIN_END(ctx); maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV) - ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxTextureImageUnits; + ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits; if (ctx->Texture.CurrentUnit >= maxUnit) { _mesa_error(ctx, GL_INVALID_OPERATION, "glTexEnvfv(current unit)"); return; @@ -748,7 +748,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) ASSERT_OUTSIDE_BEGIN_END(ctx); maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV) - ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxTextureImageUnits; + ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits; if (ctx->Texture.CurrentUnit >= maxUnit) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexEnvfv(current unit)"); return; @@ -817,7 +817,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) ASSERT_OUTSIDE_BEGIN_END(ctx); maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV) - ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxTextureImageUnits; + ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits; if (ctx->Texture.CurrentUnit >= maxUnit) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexEnviv(current unit)"); return; |