Faith Ekstrand

2.8K Followers
132 Following
776 Posts
Linux 3D graphics developer. Author of the NIR optimizing compiler core in Mesa as well as open-source Vulkan drivers for Intel and Nvidia GPUs. Engineering Fellow @Collabora. I enjoy good food, especially BBQ, tacos, and pizza.
Pronounsshe/her
Websitehttps://www.gfxstrand.net/faith/
GitLabhttps://gitlab.freedesktop.org/gfxstrand
GitHubhttps://github.com/gfxstrand

The waterfall method doesn't work for software engineering. It never has. And no matter how much we keep trying to make it work, it won't. We've been trying for 50 years and it still doesn't work.

The devil is in the details and the person who doesn't know the details will never get the high-level design right. They might get it close enough to right that it kinda works. Or maybe the entity actually implementing it can hack around the design enough to make it work. But if you don't know the details, you design it wrong.

And, no, unit tests won't save us. We tried that, too. Does anyone remember the 00s? We wrote lots of unit tests. Waterfall still didn't work.

CEOs and managers hate this. We keep trying waterfall because that's how business people want software engineering to work, not because it actually works. They want to build software like you build a building. Someone makes them pretty pictures to look at and approve, someone else comes up with the overall technical design, and then an army of workers build the building.

(And I'm not slamming on tradespeople here. They're also very skilled, far more than most architects and engineers and certainly more than the property developers know.)

But that doesn't work. It's never worked. And it keeps not working.

This post is about AI coding.

Hot take: Register allocation isn’t part of your back-end compiler. The whole compiler back-end is about register allocation.

RE: https://floss.social/@collabora/116533723198138565

In case you missed, it, my blog post about memory optimization in NIR was published today.

I built infrastructure to validate ISA-specific behavior on hardware against a `Foldable` CPU reference - the idea is straight out of NAK by @gfxstrand . Write the per-opcode reference once, run a matrix of cells (src mods × swizzles × write masks) on the GPU and compare.

It saved me so much guesswork about how each ISA instruction behaves with input values and rounding modes - hello subnormal IEEE 754 pain.

I should have started this earlier.

#etnaviv #mesa3d #rust #mntreform #librem5

Setting up age verification for my BBS

It's simple: if you know what a BBS is and manage to connect to it, you're clearly over 18.

It’s always fun to type a new compiler from blank files… 😁
@gfxstrand nice post! Audience is probably dozens of us who are both into compilers and shaders, but this audience likes it very much :)

RE: https://floss.social/@collabora/116533723198138565

In case you missed, it, my blog post about memory optimization in NIR was published today.

This walkthrough demystifies Mesa NIR’s memory optimization pipeline, including SSA promotion, deref analysis, copy propagation, and store elimination, and shows how it reduces memory traffic to boost GPU performance.

https://www.collabora.com/news-and-blog/blog/2026/05/07/optimizing-memory-access-in-nir/

#Mesa #NIR #ShaderCompiler #GPUDrivers #GraphicsDev #ShaderOptimization #Vulkan #OpenSource

Optimizing memory access in NIR

Mesa’s NIR compiler reduces shader memory traffic with SSA promotion, deref analysis, copy propagation, and store elimination.

Collabora | Open Source Consulting