PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
if (compress_with_blit(ctx, target, level, 0, 0, 0, width, height, depth,
format, type, pixels, unpack, texImage)) {
- return;
+ goto done;
}
}
_mesa_unmap_teximage_pbo(ctx, unpack);
+done:
if (stImage->pt && texImage->Data) {
st_texture_image_unmap(ctx->st, stImage);
texImage->Data = NULL;
xoffset, yoffset, zoffset,
width, height, depth,
format, type, pixels, packing, texImage)) {
- return;
+ goto done;
}
}
}
}
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
+done:
if (stImage->pt) {
st_texture_image_unmap(ctx->st, stImage);
texImage->Data = NULL;
}
+
+ if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ }
}