Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.10.0, 5.9.4
-
None
Description
The `QOpenGLShaderProgram` class in Qt can be used to compile and link OpenGL shaders. If the `GL_ARB_get_program_binary` OpenGL extension is available, it can cache those shaders on disk (~/.cache/qtshadercache). The i965 driver in Mesa supports this extension since version 18.0.0.
When the shader is loaded using the `glProgramBinary` function, OpenGL can refuse it if for example some hardware or software component changed. Mesa refuses binaries that were created by any other build of Mesa (using among other things the build_id of the library).
If the shader is refused, Qt should fallback to compiling it from sources, but it incorrectly calls glLinkProgram first. The glLinkProgram succeeds, because it actually links 0 shaders together. That is allowed in OpenGL compatibility profile and the resulting program works as a fixed pipeline. Which of course does not render as expected.
This causes rendering errors in Qt applications every time Mesa is updated since version 18.0.0. For example white screen in sddm.
This issue was originally reported in openSUSE (https://bugzilla.opensuse.org/show_bug.cgi?id=1080578).
Attachments
Issue Links
- duplicates
-
QTBUG-66420 QOpenGLShaderProgram: glProgramBinary() resulting in LINK_STATUS=FALSE not handled properly
- Closed