Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.7.2
-
None
Description
Currently, when I run Qt Quick applications, there is no automatic fallback from RHI to the software renderer when the OpenGL driver is insufficient or missing.
Case 1 - No driver available (program exits):
$ LIBGL_DRIVERS_PATH= qml6 HelloWorld.qml
qt.qpa.wayland: Failed to initialize EGL display 3001
QRhiGles2: Failed to create temporary context
QRhiGles2: Failed to create context
Failed to create RHI (backend 2)
Failed to initialize graphics backend for OpenGL.
Aborted (core dumped)
Case 2 - Driver is insufficient, failed to link shader program (empty window is drawn):
$ MESA_GL_VERSION_OVERRIDE=1.4 MESA_GLSL_VERSION_OVERRIDE=0 qml6 HelloWorld.qml
Failed to link shader program: error: vertex shader lacks `main'
Failed to build graphics pipeline state
Failed to link shader program: error: linking with uncompiled/unspecialized shader
Failed to build graphics pipeline state
Case 3 - Driver is insufficient (Intel's Gen3 GPUs have only 64 ALU instructions), failed to link shader program (fails to render a tooltip):
$ qml6 HelloWorld.qml
Failed to link shader program: error: Exceeded max ALU instructions (97/64)
Failed to build graphics pipeline state
In these cases I have to specify the environment variable 'QT_QUICK_BACKEND=software' manually to be able to run the application. Would it be possible to do that automatically?