forked from pool/libqt5-qtwebengine
Accepting request 437343 from KDE:Qt5
1 OBS-URL: https://build.opensuse.org/request/show/437343 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=15
This commit is contained in:
parent
2cb1e8395b
commit
6f356460af
73
disable-gpu-when-using-nouveau-boo-1005323.diff
Normal file
73
disable-gpu-when-using-nouveau-boo-1005323.diff
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
Index: qtwebengine-opensource-src-5.7.1/src/core/web_engine_context.cpp
|
||||||
|
===================================================================
|
||||||
|
--- qtwebengine-opensource-src-5.7.1.orig/src/core/web_engine_context.cpp
|
||||||
|
+++ qtwebengine-opensource-src-5.7.1/src/core/web_engine_context.cpp
|
||||||
|
@@ -87,6 +87,8 @@
|
||||||
|
#include <QFileInfo>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QOpenGLContext>
|
||||||
|
+#include <QOpenGLFunctions>
|
||||||
|
+#include <QOffscreenSurface>
|
||||||
|
#include <QStringList>
|
||||||
|
#include <QVector>
|
||||||
|
#include <qpa/qplatformnativeinterface.h>
|
||||||
|
@@ -158,6 +160,37 @@ void dummyGetPluginCallback(const std::v
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+QString openGLVendor()
|
||||||
|
+{
|
||||||
|
+ QString vendor;
|
||||||
|
+
|
||||||
|
+ QOpenGLContext *oldContext = QOpenGLContext::currentContext();
|
||||||
|
+ QSurface *oldSurface = 0;
|
||||||
|
+ if (oldContext)
|
||||||
|
+ oldSurface = oldContext->surface();
|
||||||
|
+
|
||||||
|
+ QScopedPointer<QOffscreenSurface> surface( new QOffscreenSurface );
|
||||||
|
+ surface->create();
|
||||||
|
+ QOpenGLContext context;
|
||||||
|
+ if (!context.create()) {
|
||||||
|
+ qDebug() << "Error creating openGL context";
|
||||||
|
+ }
|
||||||
|
+ else if (!context.makeCurrent(surface.data())) {
|
||||||
|
+ qDebug() << "Error making openGL context current context";
|
||||||
|
+ } else {
|
||||||
|
+ const GLubyte *p;
|
||||||
|
+ QOpenGLFunctions *f = context.functions();
|
||||||
|
+ if ((p = f->glGetString(GL_VENDOR)))
|
||||||
|
+ vendor = QString::fromLatin1(reinterpret_cast<const char *>(p));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ context.doneCurrent();
|
||||||
|
+ if (oldContext && oldSurface)
|
||||||
|
+ oldContext->makeCurrent(oldSurface);
|
||||||
|
+
|
||||||
|
+ return vendor;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
namespace QtWebEngineCore {
|
||||||
|
@@ -294,7 +327,20 @@ WebEngineContext::WebEngineContext()
|
||||||
|
|
||||||
|
GLContextHelper::initialize();
|
||||||
|
|
||||||
|
- if (usingANGLE() || usingSoftwareDynamicGL() || usingQtQuick2DRenderer()) {
|
||||||
|
+ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU");
|
||||||
|
+
|
||||||
|
+ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau"))
|
||||||
|
+ {
|
||||||
|
+ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n"
|
||||||
|
+ "Please consider using the propietary NVIDIA drivers.\n\n"
|
||||||
|
+ "Alternatively, you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n"
|
||||||
|
+ "environment variable before running this application, but this is \n"
|
||||||
|
+ "not recommended since this usually causes applications to crash as\n"
|
||||||
|
+ "Nouveau openGL drivers don't support multithreaded rendering";
|
||||||
|
+ disableGpu = true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (usingANGLE() || usingSoftwareDynamicGL() || usingQtQuick2DRenderer() || disableGpu) {
|
||||||
|
parsedCommandLine->AppendSwitch(switches::kDisableGpu);
|
||||||
|
} else {
|
||||||
|
const char *glType = 0;
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 25 13:40:49 UTC 2016 - alarrosa@suse.com
|
||||||
|
|
||||||
|
- Add disable-gpu-when-using-nouveau-boo-1005323.diff. Disables the
|
||||||
|
use of the gpu by webengine when the nouveau opengl driver is
|
||||||
|
detected since nouveau doesn't support rendering from different
|
||||||
|
threads. Also, allows to use two environment variables
|
||||||
|
QT_WEBENGINE_DISABLE_GPU to force the disabling of the gpu and
|
||||||
|
QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND to disable the detection
|
||||||
|
of nouveau, just in case someone wants to try with newer nouveau
|
||||||
|
releases (boo#1005323, boo#997171).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 6 09:26:52 UTC 2016 - hrvoje.senjan@gmail.com
|
Thu Oct 6 09:26:52 UTC 2016 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@ Patch2: armv6-ffmpeg-no-thumb.patch
|
|||||||
Patch3: webrtc-build-with-neon.patch
|
Patch3: webrtc-build-with-neon.patch
|
||||||
# PATCH-FIX-UPSTREAM Do-not-depend-on-Linux-4.5.patch
|
# PATCH-FIX-UPSTREAM Do-not-depend-on-Linux-4.5.patch
|
||||||
Patch4: Do-not-depend-on-Linux-4.5.patch
|
Patch4: Do-not-depend-on-Linux-4.5.patch
|
||||||
|
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing
|
||||||
|
Patch5: disable-gpu-when-using-nouveau-boo-1005323.diff
|
||||||
# http://www.chromium.org/blink not ported to PowerPC
|
# http://www.chromium.org/blink not ported to PowerPC
|
||||||
ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
ExcludeArch: ppc ppc64 ppc64le s390 s390x
|
||||||
# Try to fix i586 MemoryErrors with rpmlint
|
# Try to fix i586 MemoryErrors with rpmlint
|
||||||
@ -152,6 +154,7 @@ sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Qt Development Kit
|
Summary: Qt Development Kit
|
||||||
|
Loading…
Reference in New Issue
Block a user