LLVM Begins Landing The Initial DirectX / HLSL Target Code

Written by Michael Larabel in LLVM on 28 March 2022 at 06:40 PM EDT. 6 Comments
LLVM
Earlier this month I wrote about Microsoft engineers wanting to add DirectX and HLSL support into the upstream LLVM/Clang compiler. As of this week the very early bits of code are beginning to land in LLVM 15.0 for this Microsoft graphics effort.

Microsoft's open-source DirectX Shader Compiler "DXC" already makes use of the LLVM infrastructure but currently tracks an old fork of the code-base. Microsoft is now working towards a modern DirectX shader compiler that is to be upstream in LLVM and can then also enjoy newer C++ features, LLVM tooling improvements, and more.

The code work has begun to land albeit not yet useful for developers wanting to use it for shader compiler. Microsoft's initial focus is on DirectX Intermediate Language (DXIL) and SPIR-V support while later on they may add DirectX Bytecode (DXBC) support for that bytecode used on DirectX 9 through DirectX 11.

The code merged today is just getting the very basic groundwork laid for adding DirectX/HLSL options and boilerplate code while moving forward is when they will be hashing out more of the design elements for proper code generation and integration. An HLSL working group also looks to get off the ground for furthering this work inside and outside of Microsoft.


And so it begins...


The early bits include the likes of DirectX target support for Clang, HLSL language option and pre-processor, and stubbing out the DirectX back-end. Look for more significant contributions to land over the weeks/months ahead.
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