From d9f16f30d7225b230afcc2c1bf4ef9eb57a9acc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 1 Mar 2021 16:23:24 +0100 Subject: [PATCH] Platform: adapt the SwiftShader EGL workaround to recent changes. The 64-bit flags are now always non-empty in WindowlessEglApplication (containing the Windowless flag), so we should slice to 32-bit and check that instead. --- src/Magnum/Platform/WindowlessEglApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Platform/WindowlessEglApplication.cpp b/src/Magnum/Platform/WindowlessEglApplication.cpp index 347ef34d7..36adfadb0 100644 --- a/src/Magnum/Platform/WindowlessEglApplication.cpp +++ b/src/Magnum/Platform/WindowlessEglApplication.cpp @@ -352,7 +352,7 @@ WindowlessEglContext::WindowlessEglContext(const Configuration& configuration, G a zero value, so erase these. It also doesn't handle them as correct flags, but instead checks for the whole value, so a combination won't work either: https://github.com/google/swiftshader/blob/5fb5e817a20d3e60f29f7338493f922b5ac9d7c4/src/OpenGL/libEGL/libEGL.cpp#L794-L8104 */ - if(!configuration.flags() && version && std::strstr(version, "SwiftShader") != nullptr && (!magnumContext || !magnumContext->isDriverWorkaroundDisabled("swiftshader-no-empty-egl-context-flags"_s))) { + if(!(UnsignedLong(flags) & 0xffffffffu) && version && std::strstr(version, "SwiftShader") != nullptr && (!magnumContext || !magnumContext->isDriverWorkaroundDisabled("swiftshader-no-empty-egl-context-flags"_s))) { auto& contextFlags = attributes[Containers::arraySize(attributes) - 3]; CORRADE_INTERNAL_ASSERT(contextFlags == EGL_CONTEXT_FLAGS_KHR); contextFlags = EGL_NONE;