Congratulations to our 2022 Qt Champions!

QT OpenGL ES dramatically slower than software rendering on i.MX6 / Vivante board

  • I'm using the Variscite VAR-SOM-SOLO running an i.MX6... 1GHz single core, Vivante GC 880 + Vivante GC 320.

    This is running Yocto with OpenGL enabled, configured to run without X11 or Wayland or anything. The recipe is provided by Variscite and specifically states support for Qt5 sans X11.

    My Qt app is doing 2d rendering only, and is switchable between QOpenGLWidget and QWidget for the canvas. Example draw operations are via fillPath, drawLine, drawText.

    The app runs fine on the target.

    If I compile with software rendering (QWidget) and set QT_QPA_PLATFORM to linuxfb, the paint operation takes 8-9ms.

    The widget update/paint is called on a 60Hz timer, and it achieves this performance very easily.

    If I compile Qt to use the QOpenGLWidget, running with QT_QPA_PLATFORM=linuxfb gives me a grey screen only. Setting QT_QPA_PLATFORM=eglfs gives me a working application. Anti-aliasing in the text looks worse than software, but it essentially works. However! Draw time from the paint function alone is 40ms, so the FPS achievable is very poor. Mouse movement is even slower, <10fps.

    So far as I can tell, OpenGL ES is enabled and should be operating. Yocto and the Qt layer enable Opengl. The Vivante drivers are present in the build and kernel.

    • Where do I begin debugging this? How can I be sure that the opengl is being correctly accelerated? Is it possible that it is falling back to a slow emulation mode of the opengl functions?

    • Is the lack of X11 or similar a potential cause?

  • Unfortunately I'm still going in circles with this...

    Does anyone know a way of verifying at runtime whether OpenGL ES is operating correctly in Qt?

  • @epicedium Hi epicedium
    Currently, I'm facing the same problem as you were nearly a year ago. I'm using a very similar setup as you did, namely an i.MX6 / Vivante board, but with Wayland. My problem is, that I experience a very poor performance from my Qt application which is based on the Qt WebEngine while browsing the web.

    Some more facts:

    • On chrome://gpu I can see, that the gpu should work like desired
    • With de debugging evironment variables export QSG_INFO=1 and
      export QT_QPA_EGLFS_DEBUG=1 I can see, that openGL2.0 has been recognized.
    • My application is forced to use openGLES by QCoreApplication::setAttribute(Qt::AA_UseOpenGLES)

    Could you give me a hint, how to I can be sure, if Qt is using openGL correctly or if there is something missing? Maybe you know another way of debugging the gpu?

    I thank you in advance.

  • Export these environment variables and run the your application.

    export QSG_INFO=1
    export QT_LOGGING_RULES=qt.qpa.*=true

    ./myApp --platform eglfs

    An output as below should appear:

    qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_viv", "eglfs_viv_wl")
    qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_viv", "eglfs_viv_wl")
    qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_viv"
    qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_viv" threaded render loop Using sg animation driver GL_VENDOR: Vivante Corporation GL_RENDERER: Vivante GC880 GL_VERSION: OpenGL ES 3.0 VX.Y.Z

    Are you sure the Vivante driver is enabled? To know do:

    zcat /proc/config.gz | grep "VIV"

    Cleiton Bueno

    Blog | Linkedin | B2Open

Log in to reply