[Development] Avoiding segfaults with QML and video cards which do not support OpenGL 2.0

Lisandro Damián Nicanor Pérez Meyer perezmeyer at gmail.com
Sat Jan 16 17:45:40 CET 2016


On Friday 15 January 2016 23:27:50 Kevin Kofler wrote:
> Hi Lisandro,
[snip] 
> you just need to install this script:
> http://pkgs.fedoraproject.org/cgit/rpms/qt5-qtbase.git/plain/10-qt5-check-op
> engl2.sh to:
> /etc/X11/xinit/xinitrc.d/10-qt5-check-opengl2.sh
> and depend on glx-utils, which provides the glxinfo command the script uses.
> 
> I got the prerequisite environment variable (QT_XCB_FORCE_SOFTWARE_OPENGL)
> support added to Qt 5.3:
> https://codereview.qt-project.org/#/c/76992/
> It has been in there ever since. (I also mentioned the needed script, but
> there was no interest in shipping this with Qt, unfortunately.) This is
> checked once at X11 startup because it is fairly expensive to check the
> available OpenGL version: You have to spawn an external process and ask Mesa
> for information there. If you initialize your own process with hardware
> OpenGL, it is too late to request LIBGL_ALWAYS_SOFTWARE.

Excellent!

> We have been shipping this solution in Fedora for around 2 years now.

And now that you mention it I remember having seen that commit (I'm actually 
listed as reviewer!) and even warning my team mates about this.

The fact that we came to this two years later says a lot about people using 
old video cards I guess (plus the fact that we introduced KF5 some time later 
due to Debian Jessie's freeze).

> What I have not checked is how this interacts with Wayland. The
> glxconvenience code inside Qt where my QT_XCB_FORCE_SOFTWARE_OPENGL variable
> is actually implemented may or may not be used there. And xinitrc.d may or
> may not be run there. Don't ask me.

ACK, I will add this to the script so we get note of it. Thanks a lot!

-- 
20:57  * m4rgin4l patento el proceso de invencion
20:57 < m4rgin4l> de aqui en mas cualquier inventor me tiene que pagar
regalias por inventar algo
20:57  * m4rgin4l tiene la patente pendiente del metodo cientifico

Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160116/15fb64d1/attachment.sig>


More information about the Development mailing list