diff --git a/src/Magnum/AbstractShaderProgram.cpp b/src/Magnum/AbstractShaderProgram.cpp index 61a9db3a9..9412618e5 100644 --- a/src/Magnum/AbstractShaderProgram.cpp +++ b/src/Magnum/AbstractShaderProgram.cpp @@ -44,6 +44,11 @@ namespace Magnum { +namespace Implementation { + /* Defined in Implementation/driverSpecific.cpp */ + bool isProgramLinkLogEmpty(const std::string& result); +} + Int AbstractShaderProgram::maxVertexAttributes() { GLint& value = Context::current()->state().shaderProgram->maxVertexAttributes; @@ -371,7 +376,7 @@ bool AbstractShaderProgram::link(std::initializer_listdetectedDriver() & Context::DetectedDriver::IntelWindows) && result == "No errors.\n") + return true; + #else + static_cast(result); + #endif + + return false; +} + +/* Used in AbstractShaderProgram.cpp (duh) */ +bool isProgramLinkLogEmpty(const std::string&); +bool isProgramLinkLogEmpty(const std::string& result) { + #ifdef CORRADE_TARGET_WINDOWS + /* Intel Windows drivers are too chatty */ + if((Context::current()->detectedDriver() & Context::DetectedDriver::IntelWindows) && result == "No errors.\n") + return true; + #else + static_cast(result); + #endif + + return false; +} + +} + auto Context::detectedDriver() -> DetectedDrivers { if(_detectedDrivers) return *_detectedDrivers; diff --git a/src/Magnum/Shader.cpp b/src/Magnum/Shader.cpp index 5b2593cb8..67eb89da7 100644 --- a/src/Magnum/Shader.cpp +++ b/src/Magnum/Shader.cpp @@ -50,6 +50,11 @@ typedef char GLchar; namespace Magnum { +namespace Implementation { + /* defined in Implementation/driverSpecific.cpp */ + bool isShaderCompilationLogEmpty(const std::string& result); +} + namespace { std::string shaderName(const Shader::Type type) { @@ -770,7 +775,7 @@ bool Shader::compile(std::initializer_list> shade << message; /* Or just warnings, if any */ - } else if(!message.empty()) { + } else if(!message.empty() && !Implementation::isShaderCompilationLogEmpty(message)) { Warning out; out.setFlag(Debug::NewLineAtTheEnd, false); out.setFlag(Debug::SpaceAfterEachValue, false);