Microsoft Open-Sources DirectX Shader Compiler
Some more exciting graphics news today aside from a big Vulkan update is Microsoft announcing they have open-sourced a DirectX shader compiler.
Making this shader compiler more exciting is that it's based upon the LLVM/Clang compiler infrastructure. This DirectX HLSL (High Level Shading Language) compiler is exciting to finally see open by Microsoft. This compiler emits DXIL, a new binary shader format. This compiler supports Shader Model 6 (SM6) HLSL programs.
This new shader compiler will end up being part of the microsoft Windows SDK releases. DXIL shaders are supported as of Windows 10 Insider Build 15007. This shader compiler is open-source under the MIT license.
This is very promising for open-source going forward. There are possible benefits for Wine, if there were to be a Gallium3D state tracker for newer D3D12 (though the DXIL would need to be converted to NIR/TGSI, unless just making use of the HLSL front-end), and potentially a new route for converting HLSL to GLSL/SPIR-V. With there being OpenGL/SPIR-V components around LLVM/Clang, it will be interesting to see how good this HLSL front-end and whether there are other paths for better interoperability with other tooling around LLVM. As part of this compiler is also a validator and disassembler too.
It's great to see Microsoft open-source this DirectX shader compiler and I look forward to following it in the months ahead. More details via this MSDN blog post and the code is on GitHub.
Making this shader compiler more exciting is that it's based upon the LLVM/Clang compiler infrastructure. This DirectX HLSL (High Level Shading Language) compiler is exciting to finally see open by Microsoft. This compiler emits DXIL, a new binary shader format. This compiler supports Shader Model 6 (SM6) HLSL programs.
This new shader compiler will end up being part of the microsoft Windows SDK releases. DXIL shaders are supported as of Windows 10 Insider Build 15007. This shader compiler is open-source under the MIT license.
This is very promising for open-source going forward. There are possible benefits for Wine, if there were to be a Gallium3D state tracker for newer D3D12 (though the DXIL would need to be converted to NIR/TGSI, unless just making use of the HLSL front-end), and potentially a new route for converting HLSL to GLSL/SPIR-V. With there being OpenGL/SPIR-V components around LLVM/Clang, it will be interesting to see how good this HLSL front-end and whether there are other paths for better interoperability with other tooling around LLVM. As part of this compiler is also a validator and disassembler too.
It's great to see Microsoft open-source this DirectX shader compiler and I look forward to following it in the months ahead. More details via this MSDN blog post and the code is on GitHub.
31 Comments