From 0d178a2a9ed0dd91929baba8c7cbab18f325cc0c Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 23 Nov 2022 19:14:28 +1000 Subject: [PATCH] GL/Context: Prefer EGL over GLX on all platforms --- src/common/gl/context.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/common/gl/context.cpp b/src/common/gl/context.cpp index 07c304fb7..961a01f8e 100644 --- a/src/common/gl/context.cpp +++ b/src/common/gl/context.cpp @@ -137,17 +137,11 @@ std::unique_ptr Context::Create(const WindowInfo& wi, const Version if (wi.type == WindowInfo::Type::X11) { #ifdef USE_EGL - // Always prefer EGL when running on ARM. Mali drivers don't support GLX, - // and anything using Mesa will support EGL anyway. -#if defined(__arm__) || defined(__aarch64__) - context = ContextEGLX11::Create(wi, versions_to_try, num_versions_to_try); -#else - const char* use_egl_x11 = std::getenv("USE_EGL_X11"); - if (use_egl_x11 && std::strcmp(use_egl_x11, "1") == 0) - context = ContextEGLX11::Create(wi, versions_to_try, num_versions_to_try); - else + const char* use_glx = std::getenv("USE_GLX"); + if (use_glx && std::strcmp(use_glx, "1") == 0) context = ContextGLX::Create(wi, versions_to_try, num_versions_to_try); -#endif + else + context = ContextEGLX11::Create(wi, versions_to_try, num_versions_to_try); #else context = ContextGLX::Create(wi, versions_to_try, num_versions_to_try); #endif