From cfe3e2ff5329e5e35e6ee1e9714d254233bcb0c0 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Wed, 21 Jul 2021 10:30:26 -0700 Subject: [PATCH] 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 Part-of: (cherry picked from commit 3d64a97cf694a8f36d2a285a83b30c2558aac334) --- .pick_status.json | 2 +- src/mesa/main/teximage.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index f56b64b1f51..331c45b4344 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 }, diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 4f33e34a395..3b17a462c45 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -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); }