panfrost: Fix blending for unbacked MRT
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 18 May 2021 21:57:27 +0000 (17:57 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 18 May 2021 22:51:56 +0000 (22:51 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10869>

src/gallium/drivers/panfrost/pan_cmdstream.c

index d85e87b..b57177c 100644 (file)
@@ -397,7 +397,7 @@ panfrost_emit_midgard_blend(struct panfrost_batch *batch,
         for (unsigned i = 0; i < MAX2(rt_count, 1); ++i) {
                 /* Disable blending for unbacked render targets */
                 if (rt_count == 0 || !batch->key.cbufs[i]) {
-                        pan_pack(rts, BLEND, cfg) {
+                        pan_pack(rts + i * MALI_BLEND_LENGTH, BLEND, cfg) {
                                 cfg.midgard.equation.color_mask = 0xf;
                                 cfg.midgard.equation.rgb.a = MALI_BLEND_OPERAND_A_SRC;
                                 cfg.midgard.equation.rgb.b = MALI_BLEND_OPERAND_B_SRC;