mesa/main: Check for fbo attachments when importing EGL images to textures

Fixes an assert when binding an fbo with a texture bound to one of its attachments,
if the texture was updated with an EGL image after it was bound.

Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11998>
(cherry picked from commit 3d64a97cf6)
This commit is contained in:
Jesse Natalie 2021-07-21 10:30:26 -07:00 committed by Dylan Baker
parent ad0ba78934
commit cfe3e2ff53
2 changed files with 3 additions and 1 deletions

View file

@ -292,7 +292,7 @@
"description": "mesa/main: Check for fbo attachments when importing EGL images to textures",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -3452,6 +3452,8 @@ egl_image_target_texture(struct gl_context *ctx,
if (tex_storage)
_mesa_set_texture_view_state(ctx, texObj, target, 1);
_mesa_update_fbo_texture(ctx, texObj, 0, 0);
_mesa_unlock_texture(ctx, texObj);
}