A 9,000-line shader compiler black hole finally gets put to rest
Killing what can't be handled – putting a spaghetti demon to eternal rest

For years the dxil-spirv control flow structurizer was a fragile 9,000-line tangle that one shader update could break, and with a bus factor of one it became impossible to reason about. The author abandons human-readable output for raw correctness, borrows Mesa's goto_if implementation, and builds a fuzzer that generates random control flow graphs and runs them on the GPU to catch bugs.
The biggest mistake was thinking that I could solve all problems at once in dxil-spirv, including retaining optimal human readability of the generated code.
- e1ghtSpace
Some site feedback, not that I really know what you're talking about here at all, but I use middle mouse click and drag to scroll the page and found that doing that over the top of an image would open the image in a new tab without scrolling. I am not sure if this is something that should be fixed, but I am just reporting it here in case it is. :)
- cowlevel
I never thought about how a SIMD compiler must work on the inside. Ack!
- FrustratedMonky
Nice.
Thank You for this. Will be looking into using.