zink: add locking for zink_screen::copy_context and defer creation
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 21 Feb 2023 15:11:15 +0000 (10:11 -0500)
committerMarge Bot <emma+marge@anholt.net>
Mon, 27 Feb 2023 03:50:14 +0000 (03:50 +0000)
commitd78de2a962519cf796025417307ab0459b0e6a3e
tree433b1fa0dd3b4f22a2a33350411e583abb861b6c
parenta7b98dd4be8946856da8e6fe1a33758d864b5775
zink: add locking for zink_screen::copy_context and defer creation

the copy context isn't always used, so this allows its creation to
be deferred and potentially save a bunch of memory

also add locking for multi-context thread safety

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21452>
src/gallium/drivers/zink/zink_query.c
src/gallium/drivers/zink/zink_resource.c
src/gallium/drivers/zink/zink_screen.c
src/gallium/drivers/zink/zink_screen.h
src/gallium/drivers/zink/zink_types.h