panfrost: Adjust null_rt for Bifrost
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 26 May 2020 22:16:51 +0000 (18:16 -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_mfbd.c

index bfb79dd6d3cbfe0e774b5bb17f4f7ced7cb75f69..db7205528a97b2ee4611356a6e303055c4606aa0 100644 (file)
@@ -428,6 +428,9 @@ panfrost_attach_mfbd(struct panfrost_batch *batch, unsigned vertex_count)
 mali_ptr
 panfrost_mfbd_fragment(struct panfrost_batch *batch, bool has_draws)
 {
+        struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
+        bool is_bifrost = dev->quirks & IS_BIFROST;
+
         struct mali_framebuffer fb = panfrost_emit_mfbd(batch, has_draws);
         struct mali_framebuffer_extra fbx = {0};
         struct mali_render_target rts[4] = {0};
@@ -464,6 +467,11 @@ panfrost_mfbd_fragment(struct panfrost_batch *batch, bool has_draws)
                                 .no_preload = true
                         };
 
+                        if (is_bifrost) {
+                                null_rt.flags = 0x8;
+                                null_rt.unk3 = 0x8;
+                        }
+
                         rts[cb].format = null_rt;
                         rts[cb].framebuffer = 0;
                         rts[cb].framebuffer_stride = 0;