Killing what can’t be handled – putting a spaghetti demon to eternal rest

by themaister, October 29, 2026

The control flow graph structurizer in dxil-spirv has been a massive ballache and nasal demon for years now. I wrote about it at excruciating length many moons ago.

The architecture of this implementation stood on shaky ground, ready to tumble over by the smallest game update or random horse magnifying game coming out (yes, really). I’ve been diligently fixing issues as they came up, but this was just fixing a leaky pipe by adding some scotch tape once a fortnight while anxiously awaiting the next game update to break my sanity. About a month ago, I finally reached the breaking point, with a shader so gnarly, so insane that it took several days to fix the bug. The shader was too large for graphviz to even render in finite time. And of course, once I fixed that, I got a “oh btw, here’s another insane monstrosity that doesn’t validate”. It’s a small miracle I have not crashed out completely yet.