summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-29 10:05:06 -0600
committerBrian Paul <[email protected]>2009-10-29 10:50:26 -0600
commit99bbf4b4f55b3b0038cbaadefb92ea4a73af6e0a (patch)
treef1ac0a85b693a08d7879d72d7e0d68aaf4fb62dc /src/mesa/main/texgetimage.c
parent67df4fb56bcb72eddcfc187454d95b663cc43578 (diff)
mesa: consolidate some code in _mesa_GetTexImage()
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-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 9a88ec9ce3e..2a6c358e414 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -488,6 +488,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
{
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);
@@ -497,10 +498,9 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
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, "glGetTexImage(tex %u) format = %s, w=%d, h=%d,"
" dstFmt=0x%x, dstType=0x%x\n",
texObj->Name,
@@ -511,10 +511,6 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
_mesa_lock_texture(ctx, texObj);
{
- struct gl_texture_image *texImage =
- _mesa_select_tex_image(ctx, texObj, target, level);
-
- /* typically, this will call _mesa_get_teximage() */
ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels,
texObj, texImage);
}