# A 9,000-line shader compiler black hole finally gets put to rest

Original title: Killing what can't be handled – putting a spaghetti demon to eternal rest

> Hacker News story 50337980 · language: en · submitted 2026-11-02
> Web version: https://zeli.app/story/50337980
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 40 · by [ibobev](<https://news.ycombinator.com/user?id=ibobev>) · 💬 10
[original](<https://themaister.net/blog/2026/10/29/killing-what-cant-be-handled-putting-a-spaghetti-demon-to-eternal-rest/>) · [HN discussion](<https://news.ycombinator.com/item?id=50337980>)

## Summary

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.

## Key quote

> 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.

## HN discussion (10 comments)

### [e1ghtSpace](<https://news.ycombinator.com/item?id=50360608>)

> 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](<https://news.ycombinator.com/item?id=50360774>)

> I never thought about how a SIMD compiler must work on the inside. Ack!

### [FrustratedMonky](<https://news.ycombinator.com/item?id=50352692>)

> Nice.
>
> Thank You for this.  Will be looking into using.

---

## Cite

- Page: https://zeli.app/story/50337980
- Date: 2026-11-02
- Source: themaister.net (https://themaister.net/blog/2026/10/29/killing-what-cant-be-handled-putting-a-spaghetti-demon-to-eternal-rest/)
- Hacker News: https://news.ycombinator.com/item?id=50337980

## Other languages

- zh: https://zeli.app/zh/story/50337980 · markdown: https://zeli.app/zh/story/50337980.md
- ja: https://zeli.app/ja/story/50337980 · markdown: https://zeli.app/ja/story/50337980.md
- ko: https://zeli.app/ko/story/50337980 · markdown: https://zeli.app/ko/story/50337980.md
- de: https://zeli.app/de/story/50337980 · markdown: https://zeli.app/de/story/50337980.md
- es: https://zeli.app/es/story/50337980 · markdown: https://zeli.app/es/story/50337980.md
- ru: https://zeli.app/ru/story/50337980 · markdown: https://zeli.app/ru/story/50337980.md
