qt5base-lts/tests/manual/rhi
Laszlo Agocs b7d9b7fa69 rhi: d3d12: Implement multiview support
This relies on qsb being able to invoke dxc instead of fxc when the
request HLSL (shader model) version is 6.1.  (6.1 is required for
SV_ViewID) This currently works only when conditioning offline with
qsb (or via CMake), because qsb can easily invoke dxc instead of
fxc. When shipping HLSL inside the .qsb package (so when -c is not
specified or running the external tool fails), this won't work since
the D3D12 backend still uses D3DCompile(), not IDxcCompiler. Support
for that will be investigated separately.

We also need to bump to ID3D12Device2 and ID3D12GraphicsCommandList1.
With Windows 10 version 1703 being quite old now, this should not be a
problem at run time.

There are however issues at build time, namely that MinGW and
MinGW/LLVM and similar seems to have ancient Windows SDK headers
according to the CI test runs. None of the MSVC configurations have
this in the CI, they have reasonable versions of d3d12.h and similar.

Therefore, one important aspect of this change is that the D3D12
backend of QRhi will only be available from now on when the SDK
headers are new enough (meaning ID3D12Device2 is declared, which is a
several years old type now). Otherwise, QRhi::create() will simply
fail when asking for D3D12 with a helpful warning message about the Qt
build being crippled.

Implementation-wise, there are surprises in store as well:

The way the PSO is created needs to be revamped to follow the
extensible approach that uses a pipeline state stream
description. Both the graphics and compute pipeline creation is
changed to use CreatePipelineState() and the associated
machinery. This is only really essential for graphics pipelines since
we know have to include data for view instancing (multiview). For
compute the result is the same as before.

Additionally, the view count must now be baked into the
QRhiGraphicsPipeline. This means that applications must call
setMultiViewCount() with the same value (typically 2) *both* on the
render target's color attachment and on the pipeline. Backends that do
not care about the pipeline's view count (GL, Vulkan) will of course
ignore it, but if it's not set correctly D3D12 will fail. The manual
test is updated accordingly.

Fixes: QTBUG-114772
Change-Id: I93db7313377e711c2faeb956815899b12132d23b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-06-22 15:20:26 +02:00
..
compressedtexture_bc1 tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
compressedtexture_bc1_subupload tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
computebuffer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
computeimage tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
cubemap tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
cubemap_render tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
cubemap_scissor tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
displacement rhi manual tests: allow having some gui controls 2023-03-23 16:39:19 +01:00
float16texture_with_compute tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
floattexture tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
geometryshader Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
hellominimalcrossgfxtriangle rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
imguirenderer Replace PUBLIC_LIBRARIES with LIBRARIES in qt_internal_add_manual_test 2023-04-13 20:16:08 +02:00
instancing tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
mrt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
msaarenderbuffer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
msaatexture tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
multiview rhi: d3d12: Implement multiview support 2023-06-22 15:20:26 +02:00
multiwindow rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
multiwindow_threaded rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
noninstanced tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
offscreen rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
polygonmode Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
rhiwidget rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
shadowmap tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
shared rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
stenciloutline rhi: Add a manual test for simple stencil-based outline 2022-10-25 15:19:41 +02:00
stereo rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
tessellation rhi: metal: Add support for tessellation 2022-09-01 19:44:19 +02:00
tex1d Replace PUBLIC_LIBRARIES with LIBRARIES in qt_internal_add_manual_test 2023-04-13 20:16:08 +02:00
tex3d Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
texturearray rhi: Add D3D12 support 2023-02-07 13:33:01 +01:00
texuploads tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
triquadcube rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00
CMakeLists.txt rhi: Introduce multiview starting with OpenGL (ES) 2023-06-22 15:20:26 +02:00
rhi.pro rhi: Introduce multiview starting with OpenGL (ES) 2023-06-22 15:20:26 +02:00