From fa091640134b3ff99a9eb92df8286d15203122bf Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Fri, 16 Feb 2018 13:18:42 +0100 Subject: opengl: Bail if cached shader fails to load QOpenGLProgramBinaryCache::setProgramBinary() should check GL_LINK_STATUS after glProgramBinary(), but doesn't. In practice, this means that SDDM is a white screen, and KDE is just a gray task bar. So far, Qt tries to check this using its internal ::link() function. But in case the cached binary fails to load, Qt currently attempts to link the inexistent program, resulting in a zero-length, fixed pipeline shader. Checking this already in ::setProgramBinary() makes the call to ::link() superfluous, so we remove that as well. Done-with: Max Staudt Done-with: Michal Srb Done-with: Fabian Vogt Task-number: QTBUG-66420 Change-Id: Iabb51d0eb2c0c16bde696efff623e57d15f28d82 Reviewed-by: Jesus Fernandez Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglshaderprogram.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/gui/opengl/qopenglshaderprogram.cpp') diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index b044397f8e..1fe30f7e0e 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -3824,13 +3824,7 @@ bool QOpenGLShaderProgramPrivate::linkBinary() bool needsCompile = true; if (binCache.load(cacheKey, q->programId())) { qCDebug(DBG_SHADER_CACHE, "Program binary received from cache"); - linkBinaryRecursion = true; - bool ok = q->link(); - linkBinaryRecursion = false; - if (ok) - needsCompile = false; - else - qCDebug(DBG_SHADER_CACHE, "Link failed after glProgramBinary"); + needsCompile = false; } bool needsSave = false; -- cgit v1.2.3