Skip to content

panfrost: Overhaul push constants

Alyssa Rosenzweig requested to merge alyssa/mesa:rmu-6 into master

This series started out with the observation that our UBO handling is pretty bad. We push sysvals and UBO #0 implicitly, we don't use lower_uniforms_to_ubo on midgard but do on bifrost with no relevant architectural difference, we don't push anything on bifrost, we need redundant iadd instructions to skip over sysvals on bifrost, we need to know the total number of sysvals before emitting any code, etc...

This series attempts to fix all of these. We switch to explicit UBO analysis in the compiler backends, reporting what to push at draw time, allowing us to push other UBOs, skip disjoint ranges, pack tightly on Bifrost even if the user didn't, etc. With that change we can make sysvals their own UBO and all is well. There's no shortage of room for improvement, but overall I'm pretty happy with how this came out.

The next version of !8774 (merged) will depend on this.

Merge request reports