forked from pool/libqt5-qtbase
Accepting request 575865 from KDE:Qt5
OBS-URL: https://build.opensuse.org/request/show/575865 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=75
This commit is contained in:
parent
132196547f
commit
dca8012d99
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 12 14:21:22 UTC 2018 - mstaudt@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 - fvogt@suse.com
|
||||||
|
|
||||||
|
- Add -force-debug-info to also generate debug info in release builds
|
||||||
|
(boo#1080551)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 8 08:48:37 UTC 2018 - fabian@ritter-vogt.de
|
Thu Feb 8 08:48:37 UTC 2018 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
@ -65,6 +65,8 @@ Patch12: 0001-Add-remote-print-queue-support.patch
|
|||||||
Patch15: force-cmake-private-headers.patch
|
Patch15: force-cmake-private-headers.patch
|
||||||
# PATCH-FIX-UPSTREAM
|
# PATCH-FIX-UPSTREAM
|
||||||
Patch17: qapplication-emit-palettechanged.patch
|
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 #
|
# patches 1000- 2000 and above from upstream 5.10 branch #
|
||||||
Patch1000: 0001-xcb-verify-if-xrandr-present-before-using-xcb_randr-.patch
|
Patch1000: 0001-xcb-verify-if-xrandr-present-before-using-xcb_randr-.patch
|
||||||
Patch1001: 0001-Avoid-providing-bad-pixelDeltas-on-X11.patch
|
Patch1001: 0001-Avoid-providing-bad-pixelDeltas-on-X11.patch
|
||||||
@ -862,6 +864,7 @@ echo yes | ./configure \
|
|||||||
-no-strip \
|
-no-strip \
|
||||||
-opensource \
|
-opensource \
|
||||||
-no-separate-debug-info \
|
-no-separate-debug-info \
|
||||||
|
-force-debug-info \
|
||||||
-shared \
|
-shared \
|
||||||
-xkb \
|
-xkb \
|
||||||
-system-xkbcommon \
|
-system-xkbcommon \
|
||||||
|
79
opengl-Bail-if-cached-shader-fails-to-load.patch
Normal file
79
opengl-Bail-if-cached-shader-fails-to-load.patch
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
From 3bb3ee936f27e9749bf1a2c4bd5ded2f5167663f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Max Staudt <mstaudt@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 <mstaudt@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 <msrb@suse.com>
|
||||||
|
Cc: Fabian Vogt <fvogt@suse.de>
|
||||||
|
Signed-off-by: Max Staudt <mstaudt@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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user