Skip to content

panfrost: fix dual blending regression in Midgard compiler

panfrost: fix dual blending regression in Midgard compiler

If dual blending is enabled, only 1 output is supported. Multiple
outputs confuse the write combining pass in this case, leading to
incorrect output and/or an assert failure in emit_fragment_store.

The fix is straightforward, just skip the speculative emitting of
multiple outputs in the case where dual source blending is enabled.
A version of this fix was discovered by Christian Duerr (@chrisduerr)

As an extra sanity check I've added an assert in pan_nir_lower_zs_store
to check for only one blend store being present.

Fixes: c65a9be421c ("panfrost: Preprocess shaders at CSO create time")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9487
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Edited by Eric Smith

Merge request reports