Merge lp:~aacid/qtubuntu/mali_workaround into lp:qtubuntu

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 318
Merged at revision: 317
Proposed branch: lp:~aacid/qtubuntu/mali_workaround
Merge into: lp:qtubuntu
Diff against target: 44 lines (+20/-0)
1 file modified
src/ubuntumirclient/glcontext.cpp (+20/-0)
To merge this branch: bzr merge lp:~aacid/qtubuntu/mali_workaround
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+294512@code.launchpad.net

Commit message

Enable workaround_brokenFBOReadBack on the Mali 400

Gives for impressive improvements in QSGDefaultDistanceFieldGlyphCache::storeGlyphs
impressive = 788ms -> 6ms

Description of the change

Make uploading glyphs to the krillin device much faster

How to test:
 * stop unity8-dash
 * rm .cache/upstart/unity8-dash.log
 * start unity8-dash QSG_RENDER_TIMING=1
 * Browse horizontally through a few scopes
 * grep glyph .cache/upstart/unity8-dash.log

Both with and without this branch.

My results are:

without: http://paste.ubuntu.com/16375060/
with: http://paste.ubuntu.com/16375071/

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

PASSED: Continuous integration, rev:317
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/49/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1611
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1566
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1566
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1559
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1559/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1559
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1559/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1559
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1559/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1559
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1559/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1559
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1559/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1559
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1559/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

+ if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
+ ctx_d->workaround_brokenFBOReadBack = true;
nitpick: please use {} around the one liner if statement.

lp:~aacid/qtubuntu/mali_workaround updated
318. By Albert Astals Cid

brace yourselves!

Revision history for this message
Albert Astals Cid (aacid) wrote :

> + if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
> + ctx_d->workaround_brokenFBOReadBack = true;
> nitpick: please use {} around the one liner if statement.

Done

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

PASSED: Continuous integration, rev:318
https://unity8-jenkins.ubuntu.com/job/lp-qtubuntu-ci/52/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1616
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1570
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1570
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1563
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1563/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1563
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1563/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1563
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1563/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1563
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1563/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1563
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1563/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1563
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1563/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Tested on Krillin, I confirm the results.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntumirclient/glcontext.cpp'
2--- src/ubuntumirclient/glcontext.cpp 2016-04-28 14:09:54 +0000
3+++ src/ubuntumirclient/glcontext.cpp 2016-05-12 16:08:54 +0000
4@@ -21,6 +21,7 @@
5
6 #include <QOpenGLFramebufferObject>
7 #include <QtPlatformSupport/private/qeglconvenience_p.h>
8+#include <QtGui/private/qopenglcontext_p.h>
9
10 namespace {
11
12@@ -173,6 +174,20 @@
13 ASSERT(eglDestroyContext(mEglDisplay, mEglContext) == EGL_TRUE);
14 }
15
16+static bool needsFBOReadBackWorkaround()
17+{
18+ static bool set = false;
19+ static bool needsWorkaround = false;
20+
21+ if (!set) {
22+ const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
23+ needsWorkaround = qstrncmp(rendererString, "Mali-400", 8) == 0;
24+ set = true;
25+ }
26+
27+ return needsWorkaround;
28+}
29+
30 bool UbuntuOpenGLContext::makeCurrent(QPlatformSurface* surface)
31 {
32 Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface);
33@@ -195,6 +210,11 @@
34 return false;
35 }
36
37+ QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
38+ if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround()) {
39+ ctx_d->workaround_brokenFBOReadBack = true;
40+ }
41+
42 if (ubuntumirclient().isDebugEnabled()) {
43 printOpenGLESConfig();
44 }

Subscribers

People subscribed via source and target branches