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@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9907>
This commit is contained in:
Boris Brezillon 2021-03-30 09:34:58 +02:00
parent c105c8ad2c
commit 13ff5756ae

View file

@ -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;