st/mesa: suppress async glthread flushing for GLX_EXT_texture_from_pixmap
authorMarek Olšák <marek.olsak@amd.com>
Thu, 17 Nov 2022 13:31:33 +0000 (08:31 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 22 Nov 2022 13:04:30 +0000 (13:04 +0000)
This might fix some window system issues.

Fixes: 3da170faaec - glthread: change when glFlush flushes asynchronously

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19809>

src/mesa/state_tracker/st_manager.c

index 0e8644f..575b729 100644 (file)
@@ -832,6 +832,9 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
       st->gfx_shaders_may_be_dirty = true;
 }
 
+/* This is only for GLX_EXT_texture_from_pixmap and equivalent features
+ * in EGL and WGL.
+ */
 static bool
 st_context_teximage(struct st_context_iface *stctxi,
                     enum st_texture_type tex_type,
@@ -915,6 +918,7 @@ st_context_teximage(struct st_context_iface *stctxi,
    texObj->needs_validation = true;
 
    _mesa_dirty_texobj(ctx, texObj);
+   ctx->Shared->HasExternallySharedImages = true;
    _mesa_unlock_texture(ctx, texObj);
 
    return true;