zink: track resource_object usage instead of resource usage
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 27 Oct 2020 16:07:36 +0000 (12:07 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 16 Mar 2021 02:08:06 +0000 (22:08 -0400)
commit616720d6aec7db5c919bb3e79510b1c83fb99c47
tree53e324f51f29e9cce4c2f279d43c2fa92510b8bb
parent708f19317c2316a707d33470ce64f170a7ffb4f6
zink: track resource_object usage instead of resource usage

the resource object is now a state tracker for the inner resource_object,
so it can safely be destroyed even if the backing resource is still in use

this also requires updating various things to keep descriptor states/caches working

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