Google Gets DirectX Shader Compiler Working On Linux
The DirectX Shader Compiler is for taking the DirectX HLSL (High Level Shading Language) and using their LLVM-based compiler stack to emit DXIL, the new DirectX Intermediate Language used by Windows 10 as their new shader binary format. Over the past year and a half there have been open-source contributions to this DirectX Shader Compiler, including the ability to output to SPIR-V as the intermediate representation used by Vulkan, OpenCL, and OpenGL 4.6.
The shader compiler though hasn't run on Linux but as of this week that's now possible. The necessary Linux support changes aren't staged in Microsoft's master branch yet, but rather the Linux branch of Google's fork.
The DXC compiler is working on Linux and macOS with working code generation for DXIL and SPIR-V. This is an achievement for another Microsoft open-source project now capable of running on Linux. This may also help some in porting games to Linux if wanting to transpile their shaders from HLSL to SPIR-V for OpenGL/Vulkan usage. But this isn't any miracle like Direct3D magically running on Linux or the like. It's also not the first time that it's been possible to take HLSL and convert it into SPIR-V: Glslang and other projects already exist with similar front/back-end setups for converting between shader languages/representations.