mesa: add missing unlock_texture into generate_texture_mipmap

Fixes: 5a39938b00 "mesa: Throw an error for compressed glGenerateMipmap on GLES2 contexts."

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13152>
This commit is contained in:
Marek Olšák 2021-10-05 18:06:08 -04:00 committed by Marge Bot
parent c79ec5ea3c
commit 8f68978caa

View file

@ -160,6 +160,7 @@ generate_texture_mipmap(struct gl_context *ctx,
*/
if (ctx->API == API_OPENGLES2 && ctx->Version < 30 &&
_mesa_is_format_compressed(srcImage->TexFormat)) {
_mesa_unlock_texture(ctx, texObj);
_mesa_error(ctx, GL_INVALID_OPERATION, "generate mipmaps on compressed texture");
return;
}