panfrost: Don't freeze blit batches
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 10 May 2021 11:00:10 +0000 (13:00 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 17 May 2021 16:55:03 +0000 (16:55 +0000)
commit3c684d10be87467f06d9b73c4f9ccb2cce154dee
treeb1169a250d189be76e1657cd9759555843b9321b
parent3e74bbf631f06aa8d58dc7a9aa87165521e6cef8
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: e1649e916d67 ("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>
src/gallium/drivers/panfrost/pan_blit.c