Google Gets DirectX Shader Compiler Working On Linux

Written by Michael Larabel in Google on 26 June 2018 at 03:31 PM EDT. 18 Comments
GOOGLE
At the start of 2017 Microsoft open-sourced their new DirectX shader compiler and now thanks to the work of some Google engineers this shader compiler is 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.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week