Rendering, swapping, QML_RENDER_TIMING, too long
-
I have googled a bit of pages, and apparently the swap operation includes not only the swap itself but the actual execution of all openGL commands in the queue. That must explain why it's taking so much time.
Then I bet my GPU is limited to execute this simple program.
What do you think? -
Hmmm what's with this, found "here":http://www.opengl.org/wiki/Swap_Interval
A swap interval of 1 tells the GPU to wait for one v-blank before swapping the front and back buffers. A swap interval of 0 specifies that the GPU should never wait for v-blanks, thus performing buffer swaps as soon as possible when rendering for a frame is finished.
-
As the output suggests, the scheduling of the rendering is pretty fast. However, when the GPU is told to layer 50 unique images on top of each other, it will struggle. Even my MacBook Pro struggles with alpha blending 50 images on top of each other :)
On a lower end chips, you can expect to fill the screen 2-3 times per frame.
The scene graph will use z buffer to perform early-z IF the image is opaque (aka a .jpg), but that is still a per-pixel operation. And it only applies if the GPU does have early z.
-
Hello,
I checked my application on Qt5.0.2 and Qt5.2.1, and noticed a 7x improvement on a same HW. Is this possible according to your knowledge???
Bill
-
I don't see how it should for the example you posted above, but for a more general UI, this is very possible. Qt 5.2 introduced a new renderer which does things much better: http://blog.qt.digia.com/blog/2013/09/02/new-scene-graph-renderer/
-
Well,
I just tested an even more complex application on my Windows laptop (4700HQ processor, 32GB RAM, Dedicated NVIDIA GPU with 2GB RAM).
I have around 200 images below my rectangle. (with less images I did not get obvious differences)
With Qt5.0.2, I have this typical results: (QML_RENDER_TIMING=1)
- Breakdown of frame time; sync: 0 ms render: 12 ms swap: 20 ms total: 32 ms time since last frame: 33 ms
With Qt5.2.1, I have these typical results:(QSG_RENDER_TIMING=1)
WindowsRenderLoop: animations=0 ms- Breakdown of render time: preprocess=0, updates=0, binding=0, render=0, total=0
WindowsRenderLoop(t=4009): window=0x28fe1c, polish=0 ms, sync=0 ms, render=0 ms, swap=10 ms
It seems almost like 3x times faster on my PC!
-
Oh you are right. I did not configure anything at all on installation as far as I remember. How can I easily check this? On the link instruction basically?
Thank you.
Bill -
configure should print which OpenGL you are getting when you configure Qt. Inside Qt, you should have the QT_OPENGL_ES_2 define set if you have ANGLE. On the binaries you can check with depends.exe if qtgui is linking with opengl.dll (which is OpenGL proper) or if it using the egl/gles ANGLE library.
-
5.2.1: g++ -Wl,-subsystem,windows -mthreads -o debug\test.exe debug/main.o -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -lqtmaind -LC:\Qt521\5.2.1\mingw48_32\lib -lQt5Quickd -lQt5Qmld -lQt5Widgetsd -lQt5Networkd -lQt5Guid -lQt5Cored
5.0.2:g++ -Wl,-subsystem,windows -mthreads -o debug\test.exe debug/main.o -lmingw32 -lqtmaind -LC:\Qt\Qt5.0.2\5.0.2\mingw47_32\lib -lQt5Quickd -lQt5Qmld -lQt5Widgetsd -lQt5Networkd -lQt5Guid -lQt5Cored -llibEGLd -llibGLESv2d -lgdi32 -luser32
Apparently it's not the same libraries, but still no trace of Angle though?
Also in the build environment, no trace of this QT_OPENGL_ES_2 variable in either case.
What is your opinion?
Bill
-
grrr