panfrost: Only add resource checksum BOs to the batch once

Previously panfrost_batch_add_bo was called MAX_MIP_LEVELS times on
the same batch.

Fixes: cbf68b21fb ("panfrost: Move checksum_bo to panfrost_resource")

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10158>
This commit is contained in:
Icecream95 2021-02-08 22:50:27 +13:00 committed by Marge Bot
parent 1aeebac4e6
commit 1b41707bbc

View file

@ -561,9 +561,8 @@ panfrost_batch_add_resource_bos(struct panfrost_batch *batch,
{
panfrost_batch_add_bo(batch, rsrc->bo, flags);
for (unsigned i = 0; i < MAX_MIP_LEVELS; i++)
if (rsrc->checksum_bo)
panfrost_batch_add_bo(batch, rsrc->checksum_bo, flags);
if (rsrc->checksum_bo)
panfrost_batch_add_bo(batch, rsrc->checksum_bo, flags);
if (rsrc->separate_stencil)
panfrost_batch_add_bo(batch, rsrc->separate_stencil->bo, flags);