Qt Shader Tools: how to expand the pre-compilation story.
qsb can be requested to invoke fxc or the Metal command-line tools to include DXBC or .metallib binaries instead of source in the .qsb. This only works when building on Windows/macOS of course.
The Metal and D3D11 backends of QRhi are already prepared for picking the intermediate format from the QShader package, if such a version of the shader is available in it.
When manually doing the processing and calling qsb this is not ideal (because one may want to do it on Linux where the external tools are not available). If the build system integration happens however, that is a great opportunity because we can then invoke the right tools (so we could always include DX bytecode in the .qsb instead of HLSL sources)
The goal here is to ensure that the build system integration runs qsb with the parameters that are best suited for the platform we are building for. May also tie in to
QTBUG-78592 to some extent (as post-processing the SPIR-V binary output by glslang is conceptually the same from shadertool's perspective as post-processing the GLSL/HLSL/MSL source output by SPIRV-Cross)
Note: This does not include the vendor-specific mess APIs like OpenGL. Only the well-tooled, vendor-controlled APIs are in scope here: Metal and Direct3D. Vulkan does not need this by nature.