Mesa (master): panfrost: Don't reserve space in the color buffer for disabled RTs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 7 07:59:34 UTC 2021
Module: Mesa
Branch: master
Commit: 13ff5756ae6a265772b61ecc3757a91d3826cecf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=13ff5756ae6a265772b61ecc3757a91d3826cecf
Author: Boris Brezillon <boris.brezillon at collabora.com>
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 <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
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;
More information about the mesa-commit
mailing list