zink: abstract zink_get_resource_usage() and move it to be internal
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 28 Oct 2020 17:21:34 +0000 (13:21 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 18 Mar 2021 03:01:28 +0000 (23:01 -0400)
commit870e0e73d7071dc310c32f4590781d9634e3c65d
treec9d01d592c36112e137ca766c6c82235ff97a712
parent62b10ad1b8b613ff33a91582eed2f6c686c45c72
zink: abstract zink_get_resource_usage() and move it to be internal

I'll be rewriting how resource tracking works, so abstracting it and removing
direct uses is going to reduce the chances of breaking things as well as code churn

plus it's a bit easier to use

downside is that until that rewrite happens, this will be a (very small) perf hit and
there's some kinda gross macros involved to consolidate code

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