[Mesa-dev] [PATCH 32/42] panfrost: Set rt_count_2 for bpp>4 formats

Alyssa Rosenzweig alyssa.rosenzweig at collabora.com
Mon Jul 8 14:08:45 UTC 2019


Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
 src/gallium/drivers/panfrost/pan_mfbd.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c
index d14fb4269db..f262f6a592d 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -307,7 +307,14 @@ panfrost_mfbd_fragment(struct panfrost_context *ctx, bool has_draws)
 
         for (int cb = 0; cb < ctx->pipe_framebuffer.nr_cbufs; ++cb) {
                 struct pipe_surface *surf = ctx->pipe_framebuffer.cbufs[cb];
+                unsigned bpp = util_format_get_blocksize(surf->format);
+
                 panfrost_mfbd_set_cbuf(&rts[cb], surf);
+
+                /* What is this? Looks like some extension of the bpp field.
+                 * Maybe it establishes how much internal tilebuffer space is
+                 * reserved? */
+                fb.rt_count_2 = MAX2(fb.rt_count_2, ALIGN_POT(bpp, 4) / 4);
         }
 
         if (ctx->pipe_framebuffer.zsbuf) {
-- 
2.20.1



More information about the mesa-dev mailing list