Merge lp:~gerboland/qtubuntu/nouveau-workaround into lp:qtubuntu

Proposed by Gerry Boland
Status: Needs review
Proposed branch: lp:~gerboland/qtubuntu/nouveau-workaround
Merge into: lp:qtubuntu
Diff against target: 89 lines (+62/-8)
1 file modified
src/ubuntumirclient/qmirclientintegration.cpp (+62/-8)
To merge this branch: bzr merge lp:~gerboland/qtubuntu/nouveau-workaround
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+321283@code.launchpad.net

Commit message

Disable threaded rendering for nouveau. Enable Buffer Queueing GL too

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:385
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/218/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4761
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4789
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4612/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4612
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4612/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/218/rebuild

review: Approve (continuous-integration)
386. By Gerry Boland

Enable BufferQueueingOpenGL too

387. By Gerry Boland

Fix indenting and spacing

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:387
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/219/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4765
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4793
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4616
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4616/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4616
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4616/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4616
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4616/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4616
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4616/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4616
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4616/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4616
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4616/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/219/rebuild

review: Approve (continuous-integration)

Unmerged revisions

387. By Gerry Boland

Fix indenting and spacing

386. By Gerry Boland

Enable BufferQueueingOpenGL too

385. By Gerry Boland

Disable threaded rendering for nouveau

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/ubuntumirclient/qmirclientintegration.cpp'
--- src/ubuntumirclient/qmirclientintegration.cpp 2017-02-07 15:37:20 +0000
+++ src/ubuntumirclient/qmirclientintegration.cpp 2017-03-29 12:28:27 +0000
@@ -71,6 +71,64 @@
71#include <ubuntu/application/id.h>71#include <ubuntu/application/id.h>
72#include <ubuntu/application/options.h>72#include <ubuntu/application/options.h>
7373
74namespace {
75
76static bool mGLContextQueried{false};
77static bool mGLSupportsThreadedRendering{false};
78
79void queryGLContext()
80{
81 // Based on similar logic in the XCB plugin. Am supporting the same debug env vars too.
82 if (mGLContextQueried)
83 return;
84 mGLContextQueried = true;
85
86 static bool skip = qEnvironmentVariableIsSet("QT_OPENGL_NO_SANITY_CHECK");
87 if (skip)
88 return;
89
90 QOpenGLContext *oldContext = QOpenGLContext::currentContext();
91 QSurface *oldSurface = nullptr;
92 if (oldContext)
93 oldSurface = oldContext->surface();
94
95 QOffscreenSurface *surface = new QOffscreenSurface;
96 surface->create();
97
98 QOpenGLContext context;
99 if (!context.create() || !context.makeCurrent(surface)) {
100 qWarning("QMirClientClientIntegration: Failed to create dummy context to query");
101 mGLSupportsThreadedRendering = false;
102 return;
103 }
104
105 mGLSupportsThreadedRendering = true;
106
107 if (const char *vendor = (const char *) glGetString(GL_VENDOR)) {
108 if (strstr(vendor, "nouveau") != 0) {
109 qCInfo(mirclientGraphics) << "Multithreaded OpenGL disabled: nouveau is blacklisted";
110 mGLSupportsThreadedRendering = false;
111 }
112 }
113
114 context.doneCurrent();
115 if (oldContext && oldSurface)
116 oldContext->makeCurrent(oldSurface);
117
118 if (!mGLSupportsThreadedRendering) {
119 qCInfo(mirclientGraphics) << "Force-enable multithreaded OpenGL by setting "
120 "environment variable QT_OPENGL_NO_SANITY_CHECK";
121 }
122}
123
124bool supportsThreadedRendering()
125{
126 queryGLContext();
127 return mGLSupportsThreadedRendering;
128}
129
130} // namespace
131
74132
75class UbuntuIconTheme : public QGenericUnixTheme133class UbuntuIconTheme : public QGenericUnixTheme
76{134{
@@ -286,16 +344,12 @@
286bool QMirClientClientIntegration::hasCapability(QPlatformIntegration::Capability cap) const344bool QMirClientClientIntegration::hasCapability(QPlatformIntegration::Capability cap) const
287{345{
288 switch (cap) {346 switch (cap) {
289 case ThreadedOpenGL:347 case ThreadedOpenGL: {
290 if (qEnvironmentVariableIsEmpty("QTUBUNTU_NO_THREADED_OPENGL")) {348 return supportsThreadedRendering();
291 return true;349 }
292 } else {
293 qCDebug(mirclient, "disabled threaded OpenGL");
294 return false;
295 }
296
297 case ThreadedPixmaps:350 case ThreadedPixmaps:
298 case OpenGL:351 case OpenGL:
352 case BufferQueueingOpenGL:
299 case ApplicationState:353 case ApplicationState:
300 case MultipleWindows:354 case MultipleWindows:
301 case NonFullScreenWindows:355 case NonFullScreenWindows:

Subscribers

People subscribed via source and target branches