Skip to content

nir: Add image load shrinking pass

Alyssa Rosenzweig requested to merge alyssa/mesa:nir/shrink-loads into main

We have a NIR pass to shrink image stores when the format is known, so I wondered why we couldn't do the same for image loads. We can -- fairly easily -- and this MR does that. Unfortunately I wasn't able to find a single affected shader outside the CTS so maybe I wasted my time on this 😒

OTOH, it makes the disassembly of affected test cases a lot more compact, which makes for nicer debugging. So it's probably still a net win on that front...

Possibly this should be folded into nir_opt_shrink_vectors, assuming this is good for all backends.

(Maybe one of the radv fossils. I'm still not able to replay the whole fossil-db, wondering if I'm hitting some sort of arm64 radv fun.)

Edited by Alyssa Rosenzweig

Merge request reports