Skip to main content

Command Palette

Search for a command to run...

Standardizing HLSL: Bringing the Clang Era to Ecma

Published
3 min read
Standardizing HLSL: Bringing the Clang Era to Ecma
F
Software developer with experience in security, graphics, and compilers.

For a long time, HLSL has lived in a bit of a "trust me, it works" state. It’s the language that powers basically every high-end frame you see on a screen, but for most of its life, it lacked a formal, vendor-neutral definition. Hell even among single vendor the three implementations (FXC, DXC, & Clang-DXC) don't always agree. So what are we going to do about this?

I’m excited to share that I’ve taken on the role of Vice-Chair for the new Ecma Technical Committee 57 (TC57). Our mission? To finally turn HLSL into a formal industry standard.

Why a Standard? Why Now?

The "why" is pretty simple: portability and predictability. We are currently in the Clang era of HLSL. DXC and github/hlsl-specs was our first dip of our toes into open source. We have the muscle memory now to be able to work in the open and have built great partnerships with hardware vendors, game engine developers, and Vulkan platform contributors. We now know by upstreaming HLSL into Clang/LLVM, we can make the final steps necessary to moving away from proprietary ownership and toward a compiler infrastructure that the entire industry can contribute to and rely on. But a compiler implementation isn't a substitute for a spec thats why C\C++ have ISO.

I can't stress enough the portability reason. Thats one of the reasons we annouced 2 years ago our long term plans to retire DXIL and move to SPIR-V for shader model 7 for DirectX.

Standardizing through **Ecma International (**these are the folks behind JavaScript and C#) gives us a neutral ground. It means HLSL isn't just a "Microsoft or Windows or DirectX thing" anymore; it’s a first-class language for the whole graphics ecosystem. To be fair HLSL hasn't been a DirectX only thing for a while both DXC and Clang-DXC have evolving and in some cases robust support for Vulkan\SPIR-V.

The "State of the Union"

If you want the official annoucment, you can check it out here: Microsoft announcement on the DirectX blog. It covers the high-level goals and the move toward a royalty-free, open standard.

However, if you want a more "off the cuff" look at the technical reality—the technical debt we're clearing, and where we're headed with the standard you should absolutely read Chris’s blog post on the State of the HLSL Union. It’s a great deep dive into what this actually means for the people writing the shaders.

Building in the Open

You can check out our charter and the technical committee details on the official Ecma TC57 page, or dive straight into the code and meeting notes at the HLSL-TC57 GitHub org.

We’re focusing on making the language more rigorous, improving the "Offload Test Suite" to ensure things actually work across different backends (DXIL, SPIR-V, etc.).

It's a huge step for graphics engineering. We're finally treating the shader language with the same systems-level rigor as C++ or Rust.


Originally published at blog.farzon.org on April 6th

More from this blog

F

Farzon's blog

28 posts