KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.04k stars 603 forks source link

Compile HLSL and GLSL to SPIRV offline #802

Open tomadamatkinson opened 9 months ago

tomadamatkinson commented 9 months ago

We need a mechanism to compile HLSL/GLSL to SPIRV offline. This mechanism should be presented to the user in a way that is not project-specific. A solution should already assume that glslangValidator/shaderc and dxc are present due to the Vulkan SDK. The goal would not be to support all shaders in a first pass as this would be tedious. We only need to prove the concept on one or two shaders and to approve the macro and CMake flow

It is important that HLSL and GLSL shaders are linked under a common name so that switching between them at runtime is trivial

Acceptance Criteria:

SaschaWillems commented 3 weeks ago

With #961 finally merged, the HLSL side of things is now done :)