summaryrefslogtreecommitdiff
path: root/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-13 09:55:34 -0600
committerBrian Paul <brianp@vmware.com>2009-08-13 12:50:56 -0600
commit6aa7a03d856f4cfdbed493c976387b2164a0c922 (patch)
tree0f3f03b94f78a94c069bb86ef1685be69b50772a /src/mesa/main/texgetimage.c
parent73b150c816c46a88e3e5d97f9b73ab0095f2bc60 (diff)
mesa: use _mesa_get_current_tex_unit() in more places
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-rw-r--r--src/mesa/main/texgetimage.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 8800ee22ea..2d3b82dd38 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -37,6 +37,7 @@
#include "texformat.h"
#include "texgetimage.h"
#include "teximage.h"
+#include "texstate.h"
@@ -107,18 +108,6 @@ type_with_negative_values(GLenum type)
/**
- * Return pointer to current texture unit.
- * This the texture unit set by glActiveTexture(), not glClientActiveTexture().
- */
-static INLINE struct gl_texture_unit *
-get_current_tex_unit(GLcontext *ctx)
-{
- ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->Texture.Unit));
- return &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]);
-}
-
-
-/**
* This is the software fallback for Driver.GetTexImage().
* All error checking will have been done before this routine is called.
*/
@@ -429,7 +418,7 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
return GL_TRUE;
}
- texUnit = get_current_tex_unit(ctx);
+ texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
if (!texObj || _mesa_is_proxy_texture(target)) {
@@ -519,7 +508,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
return;
}
- texUnit = get_current_tex_unit(ctx);
+ texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
_mesa_lock_texture(ctx, texObj);
@@ -545,7 +534,7 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- texUnit = get_current_tex_unit(ctx);
+ texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
if (!texObj) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB");