panfrost: Don't freeze blit batches

We don't want blit batches to interfere with subsequent draw calls, but
we want to keep them in the list of pending batches (so they gets flushed
when glFlush() is called), so calling panfrost_freeze_batch() is not an
option. Reset the ctx->batch pointer manually.

Note that there's no risk to have those batches re-used to queue
unrelated draws because we created a unique pipe_surface object per
blit call, and the batch logic use the surface pointers to calculate
the batch key hash.

Fixes: e1649e916d ("panfrost: Use pan_blit() when PAN_MESA_DEBUG=panblit")
Reported-by: Icecream95 <ixn@disroot.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Reviewed-by:  Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10842>
This commit is contained in:
Boris Brezillon 2021-05-10 13:00:10 +02:00 committed by Marge Bot
parent 3e74bbf631
commit 3c684d10be

View file

@ -299,7 +299,14 @@ panfrost_blit(struct pipe_context *pipe,
panfrost_batch_get_bifrost_tiler(batch, ~0) : 0;
pan_blit(&bctx, &batch->pool, &batch->scoreboard,
panfrost_batch_reserve_tls(batch, false), tiler);
panfrost_freeze_batch(batch);
/* We don't want this batch to interfere with subsequent draw
* calls, but we want to keep it in the list of pending batches
* (so it gets flushed when glFlush() is called), so calling
* panfrost_freeze_batch() is not an option. Reset the
* ctx->batch pointer manually.
*/
ctx->batch = NULL;
} while (pan_blit_next_surface(&bctx));
pan_blit_ctx_cleanup(&bctx);