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

Add support for using shader storage buffers with graphics pipelines

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.9.1
    • Qt RHI
    • None

    Description

      The documentation of QRhiShaderResourceBinding::bufferLoad states that storage buffers should only be used with compute pipelines, not with graphics pipelines. It would be very useful to us if we could use storage buffers with graphics pipelines. They provide a lot more flexibility than vertex buffers.

      -------------------------------------------------

      I wrote a simple test program that uses a storage buffer with a graphics pipeline.
      The program renders 4 monochrome quads, each in a different color.
      The programs seems to work with OpenGL, Vulkan and D3D12.
      With D3D11 it fails with the error message
          Failed to create vertex shader: COM error 0x80070057: The parameter is incorrect.

      All testing was done with Windows 11, Visual Studio 2022, Qt 6.9.1.
      I tested both with an NVIDIA GeForce and an Intel Iris GPU; the results where the same.

      The program can be downloaded from
      https://github.com/jrade/StorageBufferTest
      It is a Visual Studio 2022 project.
      Bake the shaders with Resources/BakeShaders.bat.
      Select the RHI backend in Main.cpp.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            jrade Johan Råde
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes