summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-29 10:53:26 -0600
committerBrian Paul <[email protected]>2009-10-29 10:53:26 -0600
commit2b628d43c0a2f9a14ea1e87dbdcac512fca7198a (patch)
tree8da89cb9ad699666276e84c7339abfa8ad0d0aac /src
parentdcb4716802878690908a101b1c196737851d4151 (diff)
mesa: consolidate some code in _mesa_GetCompressedTexImageARB()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texgetimage.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 0b439f2e2ef..fbd61d5ae6d 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -603,6 +603,7 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
{
const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -617,10 +618,9 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
- struct gl_texture_image *texImage =
- _mesa_select_tex_image(ctx, texObj, target, level);
_mesa_debug(ctx,
"glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n",
texObj->Name,
@@ -630,10 +630,6 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
_mesa_lock_texture(ctx, texObj);
{
- struct gl_texture_image *texImage =
- _mesa_select_tex_image(ctx, texObj, target, level);
-
- /* this typically calls _mesa_get_compressed_teximage() */
ctx->Driver.GetCompressedTexImage(ctx, target, level, img,
texObj, texImage);
}