From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 79BD3138332 for ; Thu, 22 Feb 2018 22:19:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5DE69E0929; Thu, 22 Feb 2018 22:19:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2A12AE0929 for ; Thu, 22 Feb 2018 22:19:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E1B1E335C4B for ; Thu, 22 Feb 2018 22:19:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C4501A3 for ; Thu, 22 Feb 2018 22:19:38 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1519337610.aef30f8ce96a91339b398b0092b64f397fed1333.asturm@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtgui/files/, dev-qt/qtgui/ X-VCS-Repository: proj/qt X-VCS-Files: dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch dev-qt/qtgui/qtgui-5.10.1-r1.ebuild dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild X-VCS-Directories: dev-qt/qtgui/files/ dev-qt/qtgui/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: aef30f8ce96a91339b398b0092b64f397fed1333 X-VCS-Branch: master Date: Thu, 22 Feb 2018 22:19:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c8bdfeca-b359-4332-9b9f-9d4ec86ea887 X-Archives-Hash: 34ff825209ff61022caaeeb046871d6c commit: aef30f8ce96a91339b398b0092b64f397fed1333 Author: Andreas Sturmlechner gmail com> AuthorDate: Thu Feb 22 10:05:40 2018 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Thu Feb 22 22:13:30 2018 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=aef30f8c dev-qt/qtgui: Bail if cached shader fails to load Qt-Bug: https://bugreports.qt.io/browse/QTBUG-66420 See also: https://codereview.qt-project.org/#/c/221098 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch | 87 ++++++++++++++++++++++ ...-5.11.0_alpha.ebuild => qtgui-5.10.1-r1.ebuild} | 4 +- dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild | 2 + 3 files changed, 92 insertions(+), 1 deletion(-) diff --git a/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch b/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch new file mode 100644 index 00000000..2a447414 --- /dev/null +++ b/dev-qt/qtgui/files/qtgui-5.9.4-opengl.patch @@ -0,0 +1,87 @@ +From b63aeba4a88088c7de61c1664a510c02d38ade84 Mon Sep 17 00:00:00 2001 +From: Antonio Larrosa +Date: Fri, 16 Feb 2018 13:18:42 +0100 +Subject: [PATCH] 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 +(cherry picked from commit fa091640134b3ff99a9eb92df8286d15203122bf) +--- + src/gui/opengl/qopenglprogrambinarycache.cpp | 20 ++++++++++++++++++-- + src/gui/opengl/qopenglshaderprogram.cpp | 8 +------- + 2 files changed, 19 insertions(+), 9 deletions(-) + +diff --git a/src/gui/opengl/qopenglprogrambinarycache.cpp b/src/gui/opengl/qopenglprogrambinarycache.cpp +index 06373e1..d16173d 100644 +--- a/src/gui/opengl/qopenglprogrambinarycache.cpp ++++ b/src/gui/opengl/qopenglprogrambinarycache.cpp +@@ -161,10 +161,26 @@ 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(); ++ ++ GLenum err = funcs->glGetError(); ++ if (err != GL_NO_ERROR) { ++ qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program %u, size %d, " ++ "format 0x%x, err = 0x%x", ++ programId, blobSize, blobFormat, err); ++ return false; ++ } ++ GLint linkStatus = 0; ++ funcs->glGetProgramiv(programId, GL_LINK_STATUS, &linkStatus); ++ if (linkStatus != GL_TRUE) { ++ qCDebug(DBG_SHADER_CACHE, "Program binary failed to load for program %u, size %d, " ++ "format 0x%x, linkStatus = 0x%x, err = 0x%x", ++ programId, blobSize, blobFormat, linkStatus, 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 cc8af16..3b82bac 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.7.4 + diff --git a/dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild b/dev-qt/qtgui/qtgui-5.10.1-r1.ebuild similarity index 97% copy from dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild copy to dev-qt/qtgui/qtgui-5.10.1-r1.ebuild index 9c89728d..3ab13c62 100644 --- a/dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild +++ b/dev-qt/qtgui/qtgui-5.10.1-r1.ebuild @@ -29,7 +29,7 @@ RDEPEND=" ~dev-qt/qtcore-${PV} media-libs/fontconfig >=media-libs/freetype-2.6.1:2 - >=media-libs/harfbuzz-1.6.0:= + >=media-libs/harfbuzz-1.0.6:= >=sys-libs/zlib-1.2.5 virtual/opengl dbus? ( ~dev-qt/qtdbus-${PV} ) @@ -71,6 +71,8 @@ PDEPEND=" ibus? ( app-i18n/ibus ) " +PATCHES=( "${FILESDIR}/${PN}-5.9.4-opengl.patch" ) # QTBUG-66420 + QT5_TARGET_SUBDIRS=( src/tools/qvkgen src/gui diff --git a/dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild b/dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild index 9c89728d..1d2abec0 100644 --- a/dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild +++ b/dev-qt/qtgui/qtgui-5.11.0_alpha.ebuild @@ -71,6 +71,8 @@ PDEPEND=" ibus? ( app-i18n/ibus ) " +PATCHES=( "${FILESDIR}/${PN}-5.9.4-opengl.patch" ) # QTBUG-66420 + QT5_TARGET_SUBDIRS=( src/tools/qvkgen src/gui