_mesa_meta_begin(ctx, META_ALL);
+ if (original_active_unit != 0)
+ _mesa_BindTexture(target, texObj->Name);
+
if (mipmap->ArrayObj == 0) {
/* one-time setup */
/* texture is already locked, unlock now */
_mesa_unlock_texture(ctx, texObj);
- if (original_active_unit != 0)
- _mesa_BindTexture(target, texObj->Name);
-
for (dstLevel = baseLevel + 1; dstLevel <= maxLevel; dstLevel++) {
const struct gl_texture_image *srcImage;
const GLuint srcLevel = dstLevel - 1;