touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #89351
[Bug 1350863] Re: UbuntuShape incompatible with Qt Scenegraph renderer batching strategy
** Changed in: ubuntu-ui-toolkit (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1350863
Title:
UbuntuShape incompatible with Qt Scenegraph renderer batching strategy
Status in Ubuntu UI Toolkit:
Fix Released
Status in ubuntu-ui-toolkit package in Ubuntu:
Fix Released
Bug description:
The default Qt Scenegraph renderer tries to assemble common primitives in the scenegraph into batches which it can use to reduce the number of draw calls and state changes. See
http://doc-snapshot.qt-project.org/qt5-5.3/qtquick-visualcanvas-scenegraph-renderer.html
for more info.
The UbuntuShape appears to break this batching behaviour.
You can see how Qt selects batches by setting QSG_VISUALIZE=batches -
the more unique colors you can see, the less good the batching and the
more GL calls Qt needs to make to render your scene.
Here is a file which shows good batching:
import QtQuick 2.0
Item {
width: 400
height: 400
Grid {
columns: 100
Repeater {
model: 1000
delegate: Image {
source: "/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/img/map_icon.png"
}
}
}
}
If you run that with the QSG_VISUALIZE=batches variable set, you'll
see just a block of color on screen - all the delegates were
identified to share the same primitives and thus could be placed in
one batch. If you run this example under apitrace, you'll notice that
the number of GL calls is - once the batch is identified and uploaded,
it takes under 50 GL calls to re-render everything. Sure it's a
trivial example though.
Now try:
import QtQuick 2.0
import Ubuntu.Components 0.1
Item {
width: 400
height: 400
Grid {
columns: 100
Repeater {
model: 1000
delegate: UbuntuShape {
image: Image {
source: "/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/img/map_icon.png"
}
}
}
}
}
and you'll see every delegate has a different color. This means Qt was
unable to recognize that the delegates all had similar basis. If you
run under apitrace, you'll see the GPU calls per frame are in the
multiple thousands.
We really suffer from this lack of batching in listviews or gridviews
where each delegate uses an UbuntuShape.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1350863/+subscriptions