Browse Source

GL: give up and disable ARB_explicit_uniform_location on Intel Windows.

SIGH FFS.
pull/427/merge
Vladimír Vondruš 6 years ago
parent
commit
0cd72b1883
  1. 5
      doc/changelog.dox
  2. 12
      src/Magnum/GL/Implementation/driverSpecific.cpp

5
doc/changelog.dox

@ -335,6 +335,11 @@ See also:
- Added @ref GL::Context::State::UnbindPixelBuffer that's now implicitly - Added @ref GL::Context::State::UnbindPixelBuffer that's now implicitly
included in @ref GL::Context::State::EnterExternal to make Magnum work included in @ref GL::Context::State::EnterExternal to make Magnum work
correctly with 3rd party code that's not aware of PBOs. correctly with 3rd party code that's not aware of PBOs.
- The @cpp "intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped" @ce
workaround now unconditionally disables @gl_extension{ARB,explicit_uniform_location}
on Intel Windows drivers because it was discovered to be too buggy to be
useful, affecting most shaders from the @ref Shaders library. See also
@ref opengl-workarounds.
@subsubsection changelog-latest-changes-math Math library @subsubsection changelog-latest-changes-math Math library

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

@ -333,9 +333,11 @@ namespace {
or, if you are lucky, a highly-cryptic-but-still-better-than-nothing or, if you are lucky, a highly-cryptic-but-still-better-than-nothing
Error has been generated. GL error GL_INVALID_OPERATION in ProgramUniform4fv: (ID: 1725519030) GL error GL_INVALID_OPERATION: mismatched type setting uniform of location "3" in program 1, "" using shaders, 2, "", 3, "", 8, "" Error has been generated. GL error GL_INVALID_OPERATION in ProgramUniform4fv: (ID: 1725519030) GL error GL_INVALID_OPERATION: mismatched type setting uniform of location "3" in program 1, "" using shaders, 2, "", 3, "", 8, ""
*unless* you have vertex uniform locations first, fragment locations second *unless* you have vertex uniform locations first, fragment locations second
and geometry locations last. Not sure about the other stages. Note that this and geometry locations last. Another case is happening with color for a
workaround doesn't actually do anything, it's just printed as a heads-up Flat3D shader -- because a (compiled out / unused) texture matrix was at
for the sleepless nights debugging issues that happen only on Intel. */ location 1, setting color to location 2 didn't work, ending up with a
Generic error again (driver version 27). Because this is impossible to
prevent, the extension is completely disabled on all Intel Windows drivers. */
"intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped", "intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped",
#endif #endif
@ -504,9 +506,7 @@ void Context::setupDriverWorkarounds() {
_setRequiredVersion(ARB::shading_language_420pack, None); _setRequiredVersion(ARB::shading_language_420pack, None);
if((detectedDriver() & DetectedDriver::IntelWindows) && isExtensionSupported<Extensions::ARB::explicit_uniform_location>() && !isDriverWorkaroundDisabled("intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped")) { if((detectedDriver() & DetectedDriver::IntelWindows) && isExtensionSupported<Extensions::ARB::explicit_uniform_location>() && !isDriverWorkaroundDisabled("intel-windows-explicit-uniform-location-is-less-explicit-than-you-hoped")) {
/* Just to have it printed in the log. Ideal would be to have this _setRequiredVersion(ARB::explicit_uniform_location, None);
covered with a minimal repro case but I have better things to do
in my life. */
} }
#endif #endif
#endif #endif

Loading…
Cancel
Save