Skip to content

panfrost: Avoid blend shader when not blending

On Midgard, we need a "blend" shader even if blending is disabled, if the format isn't blendable. This is inefficient. Bifrost solves this by decoupling the format conversion from the blending, allowing opaque (unblended) output to any format without a blend shader or fragment key.

Unfortunately, our blend code is from the Midgard era -- I wrote an early version of nir_lower_blend when I was still in high school! -- so we've been using blend shaders for opaque output even on Bifrost. Whoops!

In SuperTuxKart, reduces blend shader calls by 30%, translating to a 15% reduction in i-cache misses.

(Rest of the series after that is related cleanup)

Edited by Alyssa Rosenzweig

Merge request reports