Browse Source

Platform: use amd-nv-no-forward-compatible-core-context only when needed.

Query its status only if we are really on that driver so it doesn't appear
in the list of used workarounds.
pull/122/merge
Vladimír Vondruš 11 years ago
parent
commit
8c4756a9e4
  1. 4
      src/Magnum/Platform/Sdl2Application.cpp
  2. 4
      src/Magnum/Platform/WindowlessGlxApplication.cpp

4
src/Magnum/Platform/Sdl2Application.cpp

@ -189,9 +189,9 @@ bool Sdl2Application::tryCreateContext(const Configuration& configuration) {
#ifndef CORRADE_TARGET_APPLE
/* Sorry about the UGLY code, HOPEFULLY THERE WON'T BE MORE WORKAROUNDS */
|| (vendorString = reinterpret_cast<const char*>(glGetString(GL_VENDOR)),
!_context->isDriverWorkaroundDisabled("amd-nv-no-forward-compatible-core-context") &&
(std::strncmp(vendorString, nvidiaVendorString, sizeof(nvidiaVendorString)) == 0 ||
std::strncmp(vendorString, amdVendorString, sizeof(amdVendorString)) == 0))
std::strncmp(vendorString, amdVendorString, sizeof(amdVendorString)) == 0)
&& !_context->isDriverWorkaroundDisabled("amd-nv-no-forward-compatible-core-context"))
#endif
)) {
/* Don't print any warning when doing the NV workaround, because the

4
src/Magnum/Platform/WindowlessGlxApplication.cpp

@ -124,9 +124,9 @@ bool WindowlessGlxApplication::tryCreateContext(const Configuration&) {
and HOPEFULLY THERE WON'T BE MORE WORKAROUNDS */
|| (glXMakeContextCurrent(_display, _pbuffer, _pbuffer, _glContext) &&
(vendorString = reinterpret_cast<const char*>(glGetString(GL_VENDOR)),
!_context->isDriverWorkaroundDisabled("amd-nv-no-forward-compatible-core-context") &&
(std::strncmp(vendorString, nvidiaVendorString, sizeof(nvidiaVendorString)) == 0 ||
std::strncmp(vendorString, amdVendorString, sizeof(amdVendorString)) == 0)))
std::strncmp(vendorString, amdVendorString, sizeof(amdVendorString)) == 0) &&
!_context->isDriverWorkaroundDisabled("amd-nv-no-forward-compatible-core-context")))
#endif
) {
/* Don't print any warning when doing the NV workaround, because the

Loading…
Cancel
Save