Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Rendering, swapping, QML_RENDER_TIMING, too long
Qt 6.11 is out! See what's new in the release blog

Rendering, swapping, QML_RENDER_TIMING, too long

Scheduled Pinned Locked Moved QML and Qt Quick
17 Posts 3 Posters 9.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    billouparis
    wrote on last edited by
    #6

    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?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dasRicardo
      wrote on last edited by
      #7

      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.

      **Sorry for my english :)

      PLEASE ADD [SOLVED] TO YOUR THREAD TITLE IF IT'S SOLVED.**

      1 Reply Last reply
      0
      • slettaS Offline
        slettaS Offline
        sletta
        wrote on last edited by
        #8

        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.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          billouparis
          wrote on last edited by
          #9

          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

          1 Reply Last reply
          0
          • slettaS Offline
            slettaS Offline
            sletta
            wrote on last edited by
            #10

            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/

            1 Reply Last reply
            0
            • B Offline
              B Offline
              billouparis
              wrote on last edited by
              #11

              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!

              1 Reply Last reply
              0
              • slettaS Offline
                slettaS Offline
                sletta
                wrote on last edited by
                #12

                It could be a number of things, I guess. Are both of these configured with -opengl desktop? If 5.0 is using ANGLE and 5.2 is using OpenGL proper, that would explain the difference.

                Anyway, I'm glad it is faster :)

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  billouparis
                  wrote on last edited by
                  #13

                  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

                  1 Reply Last reply
                  0
                  • slettaS Offline
                    slettaS Offline
                    sletta
                    wrote on last edited by
                    #14

                    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.

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      billouparis
                      wrote on last edited by
                      #15

                      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

                      1 Reply Last reply
                      0
                      • slettaS Offline
                        slettaS Offline
                        sletta
                        wrote on last edited by
                        #16

                        bq. -llibEGLd -llibGLESv2d

                        These are the ANGLE libraries. 5.2.1 is using OpenGL proper, which generally has much better performance.

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          billouparis
                          wrote on last edited by
                          #17

                          grrr

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved