summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-27 12:10:41 -0700
committerBrian Paul <[email protected]>2014-02-02 06:47:32 -0700
commit9eaed3eb6e6989427e73e4e63f0dc98c892151bf (patch)
treee0b18a0b2ed7c7ffc52062c53125c83fd00899d0 /src/mesa
parentd5df28381efe758ceebe6a6bb226763e5d527ec3 (diff)
mesa: remove unused _mesa_select_tex_object() function
The _mesa_get_current_tex_object() function is now used everywhere that _mesa_select_tex_object() was formerly used. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/teximage.c28
-rw-r--r--src/mesa/main/teximage.h5
2 files changed, 6 insertions, 27 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 59a9870ed1b..508d5466724 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -737,20 +737,14 @@ _mesa_get_proxy_target(GLenum target)
/**
- * Get the texture object that corresponds to the target of the given
- * texture unit. The target should have already been checked for validity.
- *
- * \param ctx GL context.
- * \param texUnit texture unit.
- * \param target texture target.
- *
- * \return pointer to the texture object on success, or NULL on failure.
+ * Return a pointer to the current texture object for the given target
+ * on the current texture unit.
+ * Note: all <target> error checking should have been done by this point.
*/
struct gl_texture_object *
-_mesa_select_tex_object(struct gl_context *ctx,
- const struct gl_texture_unit *texUnit,
- GLenum target)
+_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
const GLboolean arrayTex = ctx->Extensions.EXT_texture_array;
switch (target) {
@@ -818,22 +812,12 @@ _mesa_select_tex_object(struct gl_context *ctx,
return ctx->Extensions.ARB_texture_multisample
? ctx->Texture.ProxyTex[TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX] : NULL;
default:
- _mesa_problem(NULL, "bad target in _mesa_select_tex_object()");
+ _mesa_problem(NULL, "bad target in _mesa_get_current_tex_object()");
return NULL;
}
}
-/**
- * Return pointer to texture object for given target on current texture unit.
- */
-struct gl_texture_object *
-_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
-{
- struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
- return _mesa_select_tex_object(ctx, texUnit, target);
-}
-
/**
* Get a texture image pointer from a texture object, given a texture
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 9726cf9f58f..f2eb3e8d9b8 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -103,11 +103,6 @@ _mesa_clear_texture_image(struct gl_context *ctx,
extern struct gl_texture_object *
-_mesa_select_tex_object(struct gl_context *ctx,
- const struct gl_texture_unit *texUnit,
- GLenum target);
-
-extern struct gl_texture_object *
_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target);