mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 03:48:06 +02:00
mesa: unlock texture on error path in glEGLImageTargetTexStorageEXT
The texture mutex was not properly unlocked on error path, leading to deadlocks
Fixes: 6a3f5c65 ("mesa: simplify st_egl_image binding process for texture storage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7422
Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18964>
This commit is contained in:
parent
941c70a28a
commit
9e84fc73be
1 changed files with 4 additions and 1 deletions
|
|
@ -3546,8 +3546,10 @@ egl_image_target_texture(struct gl_context *ctx,
|
|||
struct st_egl_image stimg;
|
||||
bool native_supported;
|
||||
if (!st_get_egl_image(ctx, image, PIPE_BIND_SAMPLER_VIEW, caller,
|
||||
&stimg, &native_supported))
|
||||
&stimg, &native_supported)) {
|
||||
_mesa_unlock_texture(ctx, texObj);
|
||||
return;
|
||||
}
|
||||
|
||||
if (tex_storage) {
|
||||
/* EXT_EGL_image_storage
|
||||
|
|
@ -3560,6 +3562,7 @@ egl_image_target_texture(struct gl_context *ctx,
|
|||
!(target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(texture is imported from dmabuf)", caller);
|
||||
_mesa_unlock_texture(ctx, texObj);
|
||||
return;
|
||||
}
|
||||
st_bind_egl_image(ctx, texObj, texImage, &stimg, true, native_supported);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue