summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-27 12:05:53 -0700
committerBrian Paul <[email protected]>2014-02-02 06:47:32 -0700
commitf09a1261add801d75e42d74a8f648a6b31766c28 (patch)
tree5a0515287a8c4836ecb3eb8dd0d12fd468ce2148 /src/mesa/main
parent8b4f6fada2f13e42a289f63a469450fb41a5968e (diff)
mesa: use _mesa_get_current_tex_object() in GetTexLevelParameteriv()
And update a related comment. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texparam.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index e915ddd76fc..9362cf84e3a 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -118,8 +118,8 @@ validate_texture_wrap_mode(struct gl_context * ctx, GLenum target, GLenum wrap)
/**
* Get current texture object for given target.
* Return NULL if any error (and record the error).
- * Note that this is different from _mesa_select_tex_object() in that proxy
- * targets are not accepted.
+ * Note that this is different from _mesa_get_current_tex_object() in that
+ * proxy targets are not accepted.
* Only the glGetTexLevelParameter() functions accept proxy targets.
*/
static struct gl_texture_object *
@@ -1356,7 +1356,6 @@ void GLAPIENTRY
_mesa_GetTexLevelParameteriv( GLenum target, GLint level,
GLenum pname, GLint *params )
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
GLint maxLevels;
GET_CURRENT_CONTEXT(ctx);
@@ -1367,8 +1366,6 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
-
if (!legal_get_tex_level_parameter_target(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(target=0x%x)", target);
@@ -1383,7 +1380,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
return;
}
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
if (target == GL_TEXTURE_BUFFER)
get_tex_level_parameter_buffer(ctx, texObj, pname, params);