mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
mesa: consolidate some code in _mesa_GetCompressedTexImageARB()
This commit is contained in:
parent
dcb4716802
commit
2b628d43c0
1 changed files with 2 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue