Hans-Kristian Arntzen is a graphics driver and Vulkan developer who writes technical posts on GPU programming, shader translation, and debugging.
HN commenters cite his DXIL to SPIR-V posts to argue shader IRs are flawed, and link his Vulkan and AMD GPU debugging work.
Faith Ekstrand has an impressive track record of compiler work and has written a few blog posts[1], [1a]. Her Mastodon[2] is also worth a follow.
SPIR-V is important in the compute shader space, especially because DXIL and Metal's AIR are similar. I'm going to link three articles critical of SPIR-V: [3], [4], [5].
WebGPU [6] is interesting for a number of reasons, largely because they're trying to actually nail down the semantics, and also make it safe (see the uniformity analysis [7] in particular, which is a very "compiler" approach to a GPU-specific problem). Both Tint and naga projects are open source, with lots of high quality discussion in the issue trackers.
Shader languages suck, and we really need a good one. Promising approaches are Circle [8] (which is C++ based, very advanced but not open source), and Slang [9] (an evolution of HLSL). The Vcc work (also related to [4]) is worth studying.
Best of luck! This is a fascinating, if frustrating, space, and there's lots of room to improve things.
[1]: https://www.gfxstrand.net/faith/blog/
[1a]: https://www.collabora.com/news-and-blog/blog/2024/04/25/re-converging-control-flow-on-nvidia-gpus/
[2]: https://mastodon.gamedev.place/@gfxstrand
[3]: https://kvark.github.io/spirv/2021/05/01/spirv-horrors.html
[4]: https://xol.io/blah/the-trouble-with-spirv/
[5]: https://themaister.net/blog/2022/08/21/my-personal-hell-of-translating-dxil-to-spir-v-finale/
[6]: https://github.com/gpuweb/gpuweb
[7]:…
DXIL has other issues beyond being an orphaned fork of LLVM-IR. LLVM is ill-equipped to represents shaders, and there have been real bugs in the wild because of how not-a-shader-language LLVM-IR is. See this [0] post under the 'The classic subgroup breakage – maximal convergence gone awry' section. Read the whole series really if you haven't, it's a fantastic dive into how awful this stuff is.
DXIL is also a useless intermediate representation because parsing it is so bloody difficult nobody could actually do anything with it. DXIL was, and still is, functionally opaque bytes. You can't introspect it, you can't modify it or do anything of use with it. SPIR-V is dead-simple to parse and has an array of tools built around it because it's so easy to work with.
I don't really see how the OpenCL history is relevant to Vulkan either. Khronos losing the OpenCL game to Nvidia, certainly no thanks to Nvidia's sabotage either, doesn't change that SPIR-V is a much more successful format.
[0] https://themaister.net/blog/2022/04/24/my-personal-hell-of-translating-dxil-to-spir-v-part-5/
This grew out from a much rantier (and worse) version of this article, which talked about the hurdles I faced when considering SPIR-V codegen for our research compiler (Thorin).
For a while I wanted to rewrite it, and ultimately to properly discuss what I wanted to discuss, I had to write something introductory in a much broader sense. So it sort of organically grew from there, and that's why the title is now a bit weird, but I plan for the rest of the series to continue with SPIR-V as some sort of central reference point.
It's fair to say DXIL suffers from this class of troubles too, there's a series themaister where he describes the awfulness of the story over there, but I don't work with DX and I wanted to make as few comments on that as possible to avoid saying something wrong and unverified.
https://themaister.net/blog/2022/04/24/my-personal-hell-of-translating-dxil-to-spir-v-part-5/
In theory if DirectX games start passing shaders to the driver in SPIR-V, the same format Vulkan uses, then yes it should make Protons job easier. Translating the current DXIL format to SPIR-V is apparently non-trivial to say the least:
https://themaister.net/blog/2021/09/05/my-personal-hell-of-translating-dxil-to-spir-v-part-1/
https://themaister.net/blog/2021/10/03/my-personal-hell-of-translating-dxil-to-spir-v-part-2/
https://themaister.net/blog/2021/11/07/my-personal-hell-of-translating-dxil-to-spir-v-part-3/
https://themaister.net/blog/2022/04/11/my-personal-hell-of-translating-dxil-to-spir-v-part-4/
https://themaister.net/blog/2022/04/24/my-personal-hell-of-translating-dxil-to-spir-v-part-5/
You can read about DX12 being worse here: https://themaister.net/blog/2021/11/
But that's not even the point. Everyone could collaborate on the common API and make it better. Where were Apple and MS? Chasing their NIHs instead of doing it, so you argument is missing the point. It's not about how good it is (and it is good enough, though improving it is always welcome), it's about it being the only collaborative and shared effort. Everything else is simply irrelevant in result even if it could be better in some ways.
SPIR-V is also a bad format for shaders (according to shader compiler devs):
https://themaister.net/blog/2021/09/05/my-personal-hell-of-translating-dxil-to-spir-v-part-1/
The TLDR is SSA erases the structured control flow (like loops), which need to be recovered to support how branching is done on SIMD architectures (enabling/disabling lanes).