From 8b27340b2eb30cd4efdbf50803af8b03170b22bd Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 10 Nov 2024 13:11:02 +0100 Subject: [PATCH] Work around Intel driver bug on Win 8.1 and older --- irr/src/COpenGLSLMaterialRenderer.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/irr/src/COpenGLSLMaterialRenderer.cpp b/irr/src/COpenGLSLMaterialRenderer.cpp index 556405d7b..27393adeb 100644 --- a/irr/src/COpenGLSLMaterialRenderer.cpp +++ b/irr/src/COpenGLSLMaterialRenderer.cpp @@ -401,8 +401,10 @@ bool COpenGLSLMaterialRenderer::linkProgram() #endif if (maxlen == 0) { - os::Printer::log("GLSL (> 2.x): failed to retrieve uniform information", ELL_ERROR); - return false; + // Intel driver bug that seems to primarily happen on Win 8.1 or older: + // There are >0 uniforms yet the driver reports a max name length of 0. + os::Printer::log("GLSL (> 2.x): failed to retrieve uniform information", ELL_WARNING); + maxlen = 256; // hope that this is enough } // seems that some implementations use an extra null terminator @@ -471,8 +473,10 @@ bool COpenGLSLMaterialRenderer::linkProgram() #endif if (maxlen == 0) { - os::Printer::log("GLSL: failed to retrieve uniform information", ELL_ERROR); - return false; + // Intel driver bug that seems to primarily happen on Win 8.1 or older: + // There are >0 uniforms yet the driver reports a max name length of 0. + os::Printer::log("GLSL: failed to retrieve uniform information", ELL_WARNING); + maxlen = 256; // hope that this is enough } // seems that some implementations use an extra null terminator