Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116484

Update SPIRV-Cross and glslang for Qt 6.7

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P2: Important
    • 6.7
    • 6.7
    • Qt Shader Tools
    • 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-114113 must 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.
      • 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)
        • 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.
        • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            lagocs Laszlo Agocs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes