Module: Mesa
Branch: master
Commit: 13ff5756ae6a265772b61ecc3757a91d3826cecf
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=13ff5756ae6a265772b61ecc3757a91d3826cecf

Author: Boris Brezillon <[email protected]>
Date:   Tue Mar 30 09:34:58 2021 +0200

panfrost: Don't reserve space in the color buffer for disabled RTs

Render targets that have no clear or draws are disabled and thus don't
use the color buffer. Don't reserve space for those.

Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9907>

---

 src/gallium/drivers/panfrost/pan_mfbd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c 
b/src/gallium/drivers/panfrost/pan_mfbd.c
index 214931f55a7..8658b826685 100644
--- a/src/gallium/drivers/panfrost/pan_mfbd.c
+++ b/src/gallium/drivers/panfrost/pan_mfbd.c
@@ -424,6 +424,9 @@ pan_internal_cbuf_size(struct panfrost_batch *batch, 
unsigned *tile_size)
         for (int cb = 0; cb < batch->key.nr_cbufs; ++cb) {
                 struct pipe_surface *surf = batch->key.cbufs[cb];
 
+                if (!((batch->clear | batch->draws) & (PIPE_CLEAR_COLOR0 << 
cb)))
+                        surf = NULL;
+
                 if (!surf)
                         continue;
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to