Skip to content

nir+freedreno: -funroll-int16-loops

Rob Clark requested to merge robclark/mesa:nir/int16-funroll-loops into main

One of the problems with switching on int16 is that it destroys loop unrolling. So whatever gains you get from the int16, you lose more in loops that don't get unrolled.

The first patch adds a nir pass that tries to reduce phi's to 16b by either moving widening conversions into the phi or narrowing conversions out of the phi. This lets other passes clean things up enough that the loop unrolling pass can do it's job. Even without flipping on int16, shader-db was telling me this is a useful improvement (the increase in waves is a good thing, despite what report.py says).

The second patch calls the new nir pass in ir3 and flips the int16 cap now that it is no longer a performance regression

@alyssa I think this should let you turn on int16 for things other than deqp now

(I'm a bit tempted to mark this as draft since it's been a while since I've written me some nir.. but OTOH I think people tend to not review draft MRs)

Merge request reports