From 0cd72b1883899f329e1a8c482dc0fdc57ea80ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 29 Apr 2020 18:48:55 +0200 Subject: [PATCH] GL: give up and disable ARB_explicit_uniform_location on Intel Windows. SIGH FFS. --- doc/changelog.dox | 5 +++++ src/Magnum/GL/Implementation/driverSpecific.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 137b1775e..271c73642 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -335,6 +335,11 @@ See also: - Added @ref GL::Context::State::UnbindPixelBuffer that's now implicitly included in @ref GL::Context::State::EnterExternal to make Magnum work 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 diff --git a/src/Magnum/GL/Implementation/driverSpecific.cpp b/src/Magnum/GL/Implementation/driverSpecific.cpp index 86376d10b..0411ad703 100644 --- a/src/Magnum/GL/Implementation/driverSpecific.cpp +++ b/src/Magnum/GL/Implementation/driverSpecific.cpp @@ -333,9 +333,11 @@ namespace { 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, "" *unless* you have vertex uniform locations first, fragment locations second - and geometry locations last. Not sure about the other stages. Note that this - workaround doesn't actually do anything, it's just printed as a heads-up - for the sleepless nights debugging issues that happen only on Intel. */ + and geometry locations last. Another case is happening with color for a + Flat3D shader -- because a (compiled out / unused) texture matrix was at + 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", #endif @@ -504,9 +506,7 @@ void Context::setupDriverWorkarounds() { _setRequiredVersion(ARB::shading_language_420pack, None); if((detectedDriver() & DetectedDriver::IntelWindows) && isExtensionSupported() && !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 - covered with a minimal repro case but I have better things to do - in my life. */ + _setRequiredVersion(ARB::explicit_uniform_location, None); } #endif #endif