Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.1
-
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.