Hi Denis,

QSurfaceFormat::setDefaultFormat() with a format of red/blue/green set to 8, or 
alternatively setting QT_QPA_EGLFS_FORCE888 is indeed what you need. The 
default format with unspecified sizes results in choosing 16 over 32 bit 
configs when both are offered, that's normal.


Check with QSG_INFO what you get. It may either be 8880 or 8888, depending on 
what is offered by the EGL implementation. As for the 24 bit depth, regardless 
of what X or EGL says, under the hood it is quite likely that you have 32 bit 
framebuffers anyway, true packed 24 bit ones are probably rare.


As for the "other bad issues", the flickering, that is the real issue here, but 
that's likely caused by something else outside of Qt's scope.


Best regards,

Laszlo

________________________________
From: Denis Shienkov <[email protected]>
Sent: Thursday, August 4, 2016 4:48:40 PM
To: [email protected]; Laszlo Agocs
Subject: [QML][EGLFS] Bits depth

Hi guys,

I have use Qt 5.7 on Linux Embedded board (Toradex Apalis T30) with the EGLFS 
via X11 platform (NVidia drivers).

My QML application uses 24-bit PNG images. But I see that these images is looks 
like 16-bit (I see the gradients borders, and it looks ugly),
howewer my X11 uses DefaultDepth == 24!!!

Also this command:

{quote}
root@apalis-t30:~/deploy-apps# xdpyinfo | grep 'depth of root'
  depth of root window:    24 planes
{quote}

shows 24-bit mode too.

Next, I have added this debug env variable:

{quote}
 export QSG_INFO=1
{quote}

to see what happens when my QML app starts:

{quote}
...
qt.scenegraph.general: threaded render loop
qt.scenegraph.general: Using sg animation driver
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
qt.scenegraph.general: texture atlas dimensions: 2048x2048
qt.scenegraph.general: R/G/B/A Buffers:    5 6 5 0
qt.scenegraph.general: Depth Buffer:       16
qt.scenegraph.general: Stencil Buffer:     8
qt.scenegraph.general: Samples:            0
qt.scenegraph.general: GL_VENDOR:          NVIDIA Corporation
qt.scenegraph.general: GL_RENDERER:        NVIDIA Tegra 3
...
{quote}

I see that OpenGL (yes?) initializes with the "R/G/B/A Buffers:    5 6 5 0" 
mode,
that is 16-bit depth!!! O_O

Next, I have tried to change the FB depth via:

{quote}
  fbset -fb /dev/fb1 -depth 24
{quote}

I see that FB changes own settings, but nothing changes when my app starts,
it still shows images ugly, as 16-bit depth.

Also I have tried to use QT_QPA_EGLFS_DEPTH variable (with 16, 24 or 32),
but nothing changes, not helps.

Helps only the QT_QPA_EGLFS_FORCE888 variable, but it introduces others bad 
issues,
like the whole/half HDMI display flickering.. So, I can not to use 
QT_QPA_EGLFS_FORCE888..

So, is there are any tricks to use 24-bit depth?

BR,
Denis
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to