Details
-
Task
-
Resolution: Fixed
-
P2: Important
-
6.7
-
None
-
1b5477f8e (dev), 8314c056a (dev), 02dc28693 (dev)
Description
Guidelines for updating:
- glslang may have minor API changes (it certainly has in 13.0.0): investigate and understand the changes (this is often best done by looking at the Standalone application in the upstream repo), and migrate the shadertools code to it.
- The INTEGRITY patches need to be redone since they will be unlikely to apply.
Don't forget to replace the .patch files in 3rdparty/patches/glslang with the new versions.
0001-glslang-Fix-build-on-INTEGRITY.patch
0002-glslang-Rename-some-Sh-symbols-to-avoid-clashes-on-INTEGRITY.patch
0003-glslang-Add-QtShaderTools-namespace-to-avoid-INTEGRITY-issues.patch [this is a big patch]
- SPIRV-Cross has two patches at the time of writing, one for INTEGRITY, one for QNX.
0001-SPIRV-Cross-Fix-buid-on-INTEGRITY.patch
0002-SPIRV-Cross-Fix-build-on-QNX.patch- See if these apply, or need to be still applied. Update as needed, rebuild .patch files etc. (may be merged into one patch with this update)
QTBUG-114113must be taken care of for eternity. Some files must be synced between glslang and SPIRV-Cross. (and hope there's no incompatibility, though that's unlikely)- Ideally update both together, and copy the newer spirv.hpp to the other. Which project's copy is newer, will vary in practice.
- In this case (updating to glslang 13.0.0 and SPIRV-Cross sdk-1.3.261.0) it seems we'll sync glslang's copy back to SPIRV-Cross, not the other way around.
- Ideally update both together, and copy the newer spirv.hpp to the other. Which project's copy is newer, will vary in practice.
- Testing consists of:
- For SPIRV-Cross, the qshaderbaker autotest may catch some unexpected behavior changes, but this is far from comprehensive.
- If something fails, run qsb manually on the test shaders inspect the results with qsb -d (the reflection info and the generated code, to see what became different)
- For SPIRV-Cross, the qshaderbaker autotest may catch some unexpected behavior changes, but this is far from comprehensive.
-
- rebuilding Qt Quick (so that at build time it reprocesses the built-in shaders with the rebuilt qsb) and executing Qt Quick apps. Ideally complement with testing with something like qt5-cinematic-experience that has its own set of custom shaders for effects.
-
- rebuild Qt Quick 3D and run some examples with all the supported graphics APIs and see if there are no problems pop up
- ideally on Windows so you can test D3D11, D3D12, Vulkan, and OpenGL at the same time.
- Use e.g. the lights example, play with the controls (to get lights and shadows turned on/off which generates and processes different shader code under the hood), and one or two others in addition.
- Try something on macOS as well.
- rebuild Qt Quick 3D and run some examples with all the supported graphics APIs and see if there are no problems pop up
-
- Run rhi manual tests in qtbase that test the more obscure features, in particular tessellation.
- For example, build tests/manual/rhi/displacement on macOS and see if it still works. But before building, the pre-built .qsb files need to be regenerated (otherwise we are not excerising the updated glslang and SPIRV-Cross!), so run buildshaders.bat for that before building.
- Run rhi manual tests in qtbase that test the more obscure features, in particular tessellation.
Attachments
For Gerrit Dashboard: QTBUG-116484 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
499323,9 | Update to glslang 13.0.0 | dev | qt/qtshadertools | Status: MERGED | +2 | 0 |
499333,8 | Update SPIRV-Cross to sdk-1.3.261.0 | dev | qt/qtshadertools | Status: MERGED | +2 | 0 |
499682,3 | SPIRV-Cross: Sync with glslang's newer spirv.hpp | dev | qt/qtshadertools | Status: MERGED | +2 | 0 |