panfrost: Set unk2 to accomodate blending
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 26 May 2020 22:50:29 +0000 (18:50 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 27 May 2020 20:49:43 +0000 (16:49 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5232>

src/gallium/drivers/panfrost/pan_cmdstream.c

index d640cc7d327e19547923613e004f0bfeb90444a2..733351eee235a436ce35a04a037451304c16305a 100644 (file)
@@ -770,7 +770,12 @@ panfrost_frag_meta_blend_update(struct panfrost_context *ctx,
                                 brts[i].constant = blend[i].equation.constant;
 
                                 brts[i].format = panfrost_format_to_bifrost_blend(format_desc);
-                                brts[i].unk2 = 0x19;
+
+                                /* 0x19 disables blending and forces REPLACE
+                                 * mode (equivalent to rgb_mode = alpha_mode =
+                                 * x122, colour mask = 0xF). 0x1a allows
+                                 * blending. */
+                                brts[i].unk2 = blend[i].no_blending ? 0x19 : 0x1a;
 
                                 brts[i].shader_type = fs->blend_types[i];
                         } else {