panfrost: Simplify Midgard blend disable
authorAlyssa Rosenzweig <alyssa@collabora.com>
Fri, 4 Jun 2021 18:43:10 +0000 (14:43 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Jun 2021 18:06:10 +0000 (18:06 +0000)
Probably a bit faster too.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11123>

src/gallium/drivers/panfrost/pan_cmdstream.c

index 02861b6..f4628dc 100644 (file)
@@ -396,13 +396,7 @@ panfrost_emit_midgard_blend(struct panfrost_batch *batch,
                 /* Disable blending for unbacked render targets */
                 if (rt_count == 0 || !batch->key.cbufs[i]) {
                         pan_pack(packed, 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;
-                                cfg.midgard.equation.rgb.c = MALI_BLEND_OPERAND_C_ZERO;
-                                cfg.midgard.equation.alpha.a = MALI_BLEND_OPERAND_A_SRC;
-                                cfg.midgard.equation.alpha.b = MALI_BLEND_OPERAND_B_SRC;
-                                cfg.midgard.equation.alpha.c = MALI_BLEND_OPERAND_C_ZERO;
+                                cfg.enable = false;
                         }
 
                         continue;