zink: only wait on last write-batch for resources during transfer_map
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 4 Sep 2020 16:08:18 +0000 (12:08 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 23 Feb 2021 02:20:32 +0000 (21:20 -0500)
commit07df65d45f8e3ab06d4ca06dddecdecb1cc22b43
tree0c00e502bc3c065a965c112d59a5d35f2719051b
parent16792ccaa187184873e26f4e3dd8376f4ebed9e5
zink: only wait on last write-batch for resources during transfer_map

if we need to sync a resource for read-only mapping, we only need to wait on
the fence that was last flagged as having writes to the resource, not batches
that may have reads, as reads don't affect memory coherency

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