From 52802a49bcc5d794d8a58048c9ac44e86b270b5a Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 13 Sep 2021 14:55:05 +0000 Subject: [PATCH] Bug 1670545 - Disable mesa_glthread on X11/EGL, r=aosmond The combination currently triggers crashes - not on Wayland though. Put the code into non-shared code to not clutter `GLContextProviderEGL`. Differential Revision: https://phabricator.services.mozilla.com/D125403 --- gfx/thebes/gfxPlatformGtk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gfx/thebes/gfxPlatformGtk.cpp b/gfx/thebes/gfxPlatformGtk.cpp index e7bd6213415d..7ad80f9f08ac 100644 --- a/gfx/thebes/gfxPlatformGtk.cpp +++ b/gfx/thebes/gfxPlatformGtk.cpp @@ -166,6 +166,11 @@ void gfxPlatformGtk::InitX11EGLConfig() { feature.ForceDisable(FeatureStatus::Broken, "glxtest could not use EGL", "FEATURE_FAILURE_GLXTEST_NO_EGL"_ns); } + + if (feature.IsEnabled() && IsX11Display()) { + // Enabling glthread crashes on X11/EGL, see bug 1670545 + PR_SetEnv("mesa_glthread=false"); + } #else feature.DisableByDefault(FeatureStatus::Unavailable, "X11 support missing", "FEATURE_FAILURE_NO_X11"_ns);