Details
-
Task
-
Resolution: Out of scope
-
P2: Important
-
None
-
None
Description
Add GLSL optimizer support either as a QOpenGL API, as part of QOpenGLShaderProgram, or as something specific to the shader effect API in QML 2. Many graphics drivers are quite poor at doing the kind of optimizations that the GLSL optimizer linked to below does:
https://github.com/aras-p/glsl-optimizer
In addition, this should allow translating Qt's and Quick's GLES2 shader sources into GLES3/version 150/330 style. This means that Qt, SceneGraph and ShaderEffect items can continue to standardize on GLES2 shaders while the necessary dynamic translation of the sources is done internally in QOpenGLShaderProgram. The current approach of duplicating shader source code can then be eliminated.
This needs modifications to the GLSL optimizer's printing code, but it should not be very complicated. This is currently under investigation.