zink: use cached memory for all resources when possible
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 10 Dec 2020 21:25:47 +0000 (16:25 -0500)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 30 Mar 2021 21:27:15 +0000 (17:27 -0400)
commit598dc3dca41e3b1a9bf9e94b17e5426773ed6830
tree582626a9acdac86d778aa70678a2457ee3cdb3af
parent1998e216b61e29951e56f28d251c15b82c627824
zink: use cached memory for all resources when possible

this massively speeds up memory access across the driver, specifically
for pbo-related operations

it does require that mapped memory is manually invalidated/flushed, however, and
we also need to manually align host-visible memory to be able to do that

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9884>
src/gallium/drivers/zink/zink_resource.c
src/gallium/drivers/zink/zink_resource.h