Hello community,

here is the log from the commit of package libqt5-qtbase for openSUSE:Factory 
checked in at 2018-02-19 12:59:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtbase (Old)
 and      /work/SRC/openSUSE:Factory/.libqt5-qtbase.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libqt5-qtbase"

Mon Feb 19 12:59:22 2018 rev:75 rq:575865 version:5.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libqt5-qtbase/libqt5-qtbase.changes      
2018-02-12 10:09:36.385632352 +0100
+++ /work/SRC/openSUSE:Factory/.libqt5-qtbase.new/libqt5-qtbase.changes 
2018-02-19 12:59:25.709408180 +0100
@@ -1,0 +2,18 @@
+Mon Feb 12 14:21:22 UTC 2018 - msta...@suse.com
+
+- Add opengl-Bail-if-cached-shader-fails-to-load.patch:
+  Fixing broken OpenGL rendering with cached shaders.
+  This is especially systems with Mesa 18.0.0 or newer.
+
+  Many thanks to Michal Srb and Fabian Vogt for hunting this down.
+  This was truly a joint effort.
+
+  Fixes boo#1080578 and all duplicates of boo#1079465.
+
+-------------------------------------------------------------------
+Mon Feb 12 09:23:59 UTC 2018 - fv...@suse.com
+
+- Add -force-debug-info to also generate debug info in release builds
+  (boo#1080551)
+
+-------------------------------------------------------------------

New:
----
  opengl-Bail-if-cached-shader-fails-to-load.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libqt5-qtbase.spec ++++++
--- /var/tmp/diff_new_pack.fmcCEX/_old  2018-02-19 12:59:29.105285710 +0100
+++ /var/tmp/diff_new_pack.fmcCEX/_new  2018-02-19 12:59:29.109285566 +0100
@@ -65,6 +65,8 @@
 Patch15:        force-cmake-private-headers.patch
 # PATCH-FIX-UPSTREAM
 Patch17:        qapplication-emit-palettechanged.patch
+# PATCH-FIX-UPSTREAM
+Patch18:        opengl-Bail-if-cached-shader-fails-to-load.patch
 # patches 1000- 2000 and above from upstream 5.10 branch #
 Patch1000:      0001-xcb-verify-if-xrandr-present-before-using-xcb_randr-.patch
 Patch1001:      0001-Avoid-providing-bad-pixelDeltas-on-X11.patch
@@ -862,6 +864,7 @@
        -no-strip \
        -opensource \
        -no-separate-debug-info \
+       -force-debug-info \
        -shared \
        -xkb \
        -system-xkbcommon \

++++++ opengl-Bail-if-cached-shader-fails-to-load.patch ++++++
>From 3bb3ee936f27e9749bf1a2c4bd5ded2f5167663f Mon Sep 17 00:00:00 2001
From: Max Staudt <msta...@suse.de>
Date: Mon, 12 Feb 2018 15:07:29 +0100
Subject: [PATCH] opengl: Bail if cached shader fails to load
References: boo#1080578, boo#1079465
Signed-off-by: Max Staudt <msta...@suse.de>

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.

Many thanks to Michal Srb and Fabian Vogt for hunting this down.
This was truly a joint effort.

Cc: Michal Srb <m...@suse.com>
Cc: Fabian Vogt <fv...@suse.de>
Signed-off-by: Max Staudt <msta...@suse.de>
---
 src/gui/opengl/qopenglprogrambinarycache.cpp | 11 ++++++++++-
 src/gui/opengl/qopenglshaderprogram.cpp      |  8 +-------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/gui/opengl/qopenglprogrambinarycache.cpp 
b/src/gui/opengl/qopenglprogrambinarycache.cpp
index 06373e1113..f50878ab5c 100644
--- a/src/gui/opengl/qopenglprogrambinarycache.cpp
+++ b/src/gui/opengl/qopenglprogrambinarycache.cpp
@@ -161,10 +161,19 @@ bool QOpenGLProgramBinaryCache::setProgramBinary(uint 
programId, uint blobFormat
     QOpenGLExtraFunctions *funcs = 
QOpenGLContext::currentContext()->extraFunctions();
     while (funcs->glGetError() != GL_NO_ERROR) { }
     funcs->glProgramBinary(programId, blobFormat, p, blobSize);
+
     int err = funcs->glGetError();
+    GLint link_status = 0;
+    funcs->glGetProgramiv(programId, GL_LINK_STATUS, &link_status);
+    if (link_status != GL_TRUE || err != GL_NO_ERROR) {
+        qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program 
%u, size %d, format 0x%x, link_status = 0x%x, err = 0x%x",
+                programId, blobSize, blobFormat, link_status, err);
+        return false;
+    }
+
     qCDebug(DBG_SHADER_CACHE, "Program binary set for program %u, size %d, 
format 0x%x, err = 0x%x",
             programId, blobSize, blobFormat, err);
-    return err == 0;
+    return true;
 }
 
 #ifdef Q_OS_UNIX
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp 
b/src/gui/opengl/qopenglshaderprogram.cpp
index cc8af16bfe..3b82baccb3 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;
-- 
2.13.6


Reply via email to