qt: provide newest versions of the shaders alongside old versions
We should not refrain ourselves from the performance improvements of the newer versions just because the old versions work fine. We can provide newer versions alongside old versions, Qt tries to use the newest version first.
I expect the size impact to be negligible, considering that qsb files are compressed.
RHI for D3D12 is able to compile HLSL 6 at runtime
using dxcompiler
, similar to D3D11 using d3dcompiler
.
It is not necessary to make dxc
tool present, as
the compilation result appears to be cached anyway.
Presence of dxcapi.h
that is part of DirectX shader
compiler is required for runtime compilation to work.
However, recent versions of MinGW already provides it.
And if older MinGW is used, then it should simply
fallback using the HLSL 5.0 shader provided alongside
HLSL 6.7 as proposed here.
I wanted to use MSL 3.2, but Qt does not seem to try versions higher than 3.0 at the moment.
If you are wondering why we originally picked these old versions first, that's because Qt 6.2's qsb does not support "qt6" option, and qsb used these when it supports the "qt6" option.
Request review @chub.