It seems that indexed rendering of triangle strips with primitive restart does not work with D3D12.
I wrote a simple test program that demonstrates the problem. It renders 4 quads.
With OpenGL, Vulkan and D3D11 I get 4 quads as expected (Image1.png).
But with D3D12 I get a mess (Image2.png).
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/DrawIndexedIssue
It is a Visual Studio 2022 project.
Bake the shaders with Resources/BakeShaders.bat.
Select the RHI backend in Main.cpp.
For Gerrit Dashboard: QTBUG-137219 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
676222,3 | rhi: d3d12: Fix primitive restart | dev | qt/qtbase | Status: MERGED | +2 | +1 |
681658,1 | rhi: d3d12: Fix primitive restart | 6.10 | qt/qtbase | Status: STAGED | +2 | 0 |