From: Brian Paul Date: Mon, 27 Jan 2014 19:05:53 +0000 (-0700) Subject: mesa: use _mesa_get_current_tex_object() in GetTexLevelParameteriv() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f09a1261add801d75e42d74a8f648a6b31766c28;p=mesa.git mesa: use _mesa_get_current_tex_object() in GetTexLevelParameteriv() And update a related comment. Reviewed-by: Kenneth Graunke --- 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);