zink: create a single fence per batch on startup and then reuse
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 24 Feb 2021 02:40:51 +0000 (21:40 -0500)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 25 Feb 2021 02:09:52 +0000 (21:09 -0500)
commitda2d8f1078aabf9baddb4400633cfb89e4f9b1b8
treece0b7b14aeb9c7afe8298a91f63bcb0159821ba9
parenta27570326f7607964f2d84f6f1cae0071e678c2a
zink: create a single fence per batch on startup and then reuse

previously we would be creating a new fence per batch for every submit,
but we can just reset and reuse them if we're careful with it

based on original patch by Antonio Caggiano

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