panfrost/decode: Hit MRT blend shader enable bits
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 30 Apr 2019 02:15:09 +0000 (02:15 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Wed, 1 May 2019 23:20:50 +0000 (23:20 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/include/panfrost-job.h
src/gallium/drivers/panfrost/pandecode/decode.c

index 97fcb0380dd2b8bf3b68896d55baef66bd393732..c2d922678b8174ab6d88f71bffaa7e2d8bf289c5 100644 (file)
@@ -424,8 +424,10 @@ struct mali_blend_meta {
 
         u64 unk1;
 
-        /* For programmable blending, these turn into the blend_shader address */
-        struct mali_blend_equation blend_equation_1;
+        union {
+                struct mali_blend_equation blend_equation_1;
+                mali_ptr blend_shader;
+        };
 
         u64 zero2;
         struct mali_blend_equation blend_equation_2;
index bb6f4b1971140c682e08fcbd461d14c9249de9d6..9936249e52417041f78f0d640e102d7a5de9ee47 100644 (file)
@@ -1278,7 +1278,20 @@ pandecode_replay_vertex_tiler_postfix_pre(const struct mali_vertex_tiler_postfix
 
 #ifndef BIFROST
                                 pandecode_prop("unk1 = 0x%" PRIx64, b->unk1);
-                                pandecode_replay_blend_equation(&b->blend_equation_1, "_1");
+
+                                /* Depending on unk1, we determine if there's a
+                                 * blend shader */
+
+                                if ((b->unk1 & 0xF) >= 0x2) {
+                                        blend_shader = true;
+                                        pandecode_replay_shader_address("blend_shader", b->blend_shader);
+                                } else {
+                                        pandecode_replay_blend_equation(&b->blend_equation_1, "_1");
+                                }
+
+                                /* This is always an equation, I think. If
+                                 * there's a shader, it just defaults to
+                                 * REPLACE (0x122) */
                                 pandecode_replay_blend_equation(&b->blend_equation_2, "_2");
 
                                 if (b->zero2) {