Microsoft Starts Preparing Its Open-Source DirectX Shader Compiler For "HLSL 202x"

Written by Michael Larabel in Microsoft on 28 May 2024 at 02:33 PM EDT. 19 Comments
MICROSOFT
Microsoft's open-source DirectX Shader Compiler that is open-source and derived from the LLVM/Clang compiler infrastructure is out with a significant new release as it begins preparing for "HLSL 202x" as a big leap for the High-Level Shader Language.

HLSL 202x is the placeholder name for the next-generation version of the High-Level Shader Language, the shading language used by Direct3D and akin to OpenGL's GLSL. With today's DirectX Compiler v1.8.2405 release, just the first component of HLSL 202x is being rolled out. Microsoft's GitHub release announcement explains:
"HLSL 202x is a placeholder designation for what will ultimately be a new language version that further aligns HLSL with modern language features. It is intended to serve as a bridge to help transition to the expected behavior of the modernized compiler.

To experiment with 202x, use the -HV 202x flag. We recommend enabling these warnings as well to catch potential changes in behavior: -Wconversion -Wdouble-promotion -Whlsl-legacy-literal.

The first feature available in 202x updates HLSL's treatment of literals to better conform with C/C++. In previous versions, un-suffixed literal types targeted the highest possible precision. This feature revises that to mostly conform with C/C++ behavior. See the above blog post for details.

Clang-built Windows binaries are included in addition to the MSVC-built binaries that have always been shipped before. The clang-built compiler is expected to improve HLSL compile times in many cases. We are eager for feedback about this build positive or negative, related to compile times or correctness."

There is also a Microsoft DirectX blog post highlighting the faster build times of using the Clang-built DirectX Compiler and the work that's ongoing to evolve the HLSL language. With the HLSL 202x work is also a formal language specification being developed. HLSL 202y as the HLSL 202x successor is also being developed in parallel.

DirectX Compiler May release


Downloads -- both the source code and Windows / Linux binaries -- and more information on today's DirectX Compiler v1.8.2405 release can be found via GitHub.
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