Browse Source

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.
euler-xxx
Vladimír Vondruš 5 years ago
parent
commit
d9f16f30d7
  1. 2
      src/Magnum/Platform/WindowlessEglApplication.cpp

2
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;

Loading…
Cancel
Save