panfrost: Copy resources when mapping to avoid waiting for readers
authorIcecream95 <ixn@keemail.me>
Sat, 20 Jun 2020 07:30:54 +0000 (19:30 +1200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 22 Jun 2020 12:15:05 +0000 (12:15 +0000)
commit361fb38662f80e645e9087781faa4bec10dd6ac7
treef66f139677eebbb0e7ab8034f5b95718f4e44e50
parent65b3b08aaf4f5e9d9207e174232b4bbb820d7de4
panfrost: Copy resources when mapping to avoid waiting for readers

It is often faster to copy the whole resource and modify that than
to flush and wait for readers of the BO.

Helps anything which updates textures after already using them in a
frame, such as most GLQuake ports.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5573>
src/gallium/drivers/panfrost/pan_resource.c