zink: rework query handling

Graphics / Mesa 3D Graphics Library / Mesa - Mike Blumenkrantz [gmail.com] - 13 July 2020 20:59 UTC

this hooks up query objects to the batches that they're actively running on (and the related fence) in order to manage the lifetimes of queries more efficiently by calling vkCmdResetQueryPool only on init and when the query pool has been completely used up. additionally, this resolves some vk spec issues related to destroying pools with active queries

note that any time a query pool is completely used up, results are lost, which is a very slight improvement on the previous abort() that was triggered in that scenario

ref mesa/mesa#3000

3eea7fc88bb zink: rework query handling
src/gallium/drivers/zink/zink_batch.c | 7 +-
src/gallium/drivers/zink/zink_batch.h | 3 +
src/gallium/drivers/zink/zink_context.c | 1 +
src/gallium/drivers/zink/zink_context.h | 2 +-
src/gallium/drivers/zink/zink_fence.c | 13 ++-
src/gallium/drivers/zink/zink_fence.h | 3 +-
src/gallium/drivers/zink/zink_query.c | 182 +++++++++++++++++++-------------
src/gallium/drivers/zink/zink_query.h | 5 +
8 files changed, 135 insertions(+), 81 deletions(-)

Upstream: cgit.freedesktop.org


  • Share