qt: probe d3d12 before d3d11 on windows
Since the probe result is cached, we don't have performance impact at each startup as probing is done asynchronously with its result being respected for the next startup.
This means that we don't have anything to lose by probing d3d12 first, which makes more sense to use if available compared to d3d11.
The video integration has already been tested.
Note that on Windows 7, even if DirectX 12 is installed d3d12 is not usable as RHI also uses Direct Composition with it where it is not available on Windows 7. So, this is mainly relevant for Windows 8/10/11.
D3D12 can use the already provided HLSL 5.0 shaders, so we don't need to necessarily provide HLSL 6 shaders for it to work. Although ideally the latest version should be provided, that is handled in a different commit.
Based on !6818.
Request review @chub.
Merge request reports
Activity
added MRStatus::Reviewable label
Depends on !6793 (merged).
added MRStatus::InReview label and removed MRStatus::Reviewable label
added Component::Interface: Qt label
changed milestone to %4.0
mentioned in merge request !6792
It seems [1] that currently
QRhiD3D12
does not cache the shader bytecode unlikeQRhiD3D11
. This is not too relevant with HLSL 6 because we would need to compile beforehand anyway (as we can not expectdxcompiler.dll
presence in the system).So we should probably proceed with this once we start providing HLSL 6 (!6803), as otherwise when it consumes HLSL 5, it would compile at each start if it is not pre-compiled (with
fxc
, where I proposed to remove it in !6792).[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/rhi/qrhid3d12.cpp#n817 [2] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/rhi/qrhid3d11.cpp#n667
added MRStatus::NotCompliant label and removed MRStatus::InReview label