Browse Source

GL: remove the nv-egl-forward-compatible-context-unhappy workaround.

This was my bug, as requesting a forward-compatible context without
saying *what* version it should be forward compatible to makes no sense.
A followup to 73baab69ce.
pull/388/head
Vladimír Vondruš 7 years ago
parent
commit
507c5bf739
  1. 5
      doc/changelog.dox
  2. 6
      src/Magnum/GL/Implementation/driverSpecific.cpp
  3. 10
      src/Magnum/Platform/WindowlessEglApplication.cpp

5
doc/changelog.dox

@ -420,11 +420,6 @@ See also:
would assume a zero-sized framebuffer. This behavior is no longer silent would assume a zero-sized framebuffer. This behavior is no longer silent
but advertised as a @cpp "apitrace-zero-initial-viewport" @ce workaround. but advertised as a @cpp "apitrace-zero-initial-viewport" @ce workaround.
See @ref opengl-workarounds for more information. See @ref opengl-workarounds for more information.
- Added a @cpp "nv-egl-forward-compatible-context-unhappy" @ce workaround
that removes @ref Platform::WindowlessEglApplication::Configuration::Flag::ForwardCompatible
from flags passed to `eglCreateContext()` as that otherwise causes NVidia
to fail with `EGL_BAD_MATCH`. See @ref opengl-workarounds for more
information.
- @ref GL::OpenGLTester no longer implicitly enables @ref GL::DebugOutput as - @ref GL::OpenGLTester no longer implicitly enables @ref GL::DebugOutput as
it can be quite spammy when complex shaders or benchmarks are allowed. For it can be quite spammy when complex shaders or benchmarks are allowed. For
easier debugging, users are encouraged to use the new easier debugging, users are encouraged to use the new

6
src/Magnum/GL/Implementation/driverSpecific.cpp

@ -128,12 +128,6 @@ namespace {
possible to get driver version through EGL, so enabling this unconditionally possible to get driver version through EGL, so enabling this unconditionally
on all EGL NV contexts. */ on all EGL NV contexts. */
"nv-egl-incorrect-gl11-function-pointers", "nv-egl-incorrect-gl11-function-pointers",
/* NVidia is unhappy when EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR is
present among attributes passed to eglCreateContext(), blowing up with
EGL_BAD_MATCH. This flag is enabled by default, wiping it away to make the
context creation work. */
"nv-egl-forward-compatible-context-unhappy",
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES

10
src/Magnum/Platform/WindowlessEglApplication.cpp

@ -226,16 +226,6 @@ WindowlessEglContext::WindowlessEglContext(const Configuration& configuration, G
flags |= Configuration::Flag::Debug; flags |= Configuration::Flag::Debug;
#endif #endif
#ifndef MAGNUM_TARGET_GLES
/* NVidia doesn't like EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR for
some reason, failing eglCreateContext() with EGL_BAD_MATCH. If this flag
is set, wipe it away. */
const char* vendor = eglQueryString(_display, EGL_VENDOR);
if((flags & Configuration::Flag::ForwardCompatible) && vendor && std::strcmp(vendor, "NVIDIA") == 0 && (!magnumContext || !magnumContext->isDriverWorkaroundDisabled("nv-egl-forward-compatible-context-unhappy"))) {
flags &= ~Configuration::Flag::ForwardCompatible;
}
#endif
#if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_WEBGL) #if !defined(MAGNUM_TARGET_GLES) || defined(MAGNUM_TARGET_WEBGL)
const /* Is modified below to work around a SwiftShader limitation */ const /* Is modified below to work around a SwiftShader limitation */
#endif #endif

Loading…
Cancel
Save