zink: prune active queries in reset_batch_state_ctx()

these need the context

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37379>
This commit is contained in:
Mike Blumenkrantz 2025-09-17 07:45:06 -04:00
parent 6369dbd6be
commit 7e101873ea

View file

@ -79,11 +79,6 @@ reset_batch_state_internal(struct zink_screen *screen, struct zink_batch_state *
memset(&bs->buffer_indices_hashlist, -1, sizeof(bs->buffer_indices_hashlist));
/* queries must only be destroyed once they are inactive */
set_foreach_remove(&bs->active_queries, entry) {
struct zink_query *query = (void*)entry->key;
zink_prune_query(bs, query);
}
util_dynarray_foreach(&bs->dead_querypools, VkQueryPool, pool)
VKSCR(DestroyQueryPool)(screen->dev, *pool, NULL);
util_dynarray_clear(&bs->dead_querypools);
@ -177,6 +172,12 @@ reset_batch_state_ctx(struct zink_context *ctx, struct zink_batch_state *bs)
util_idalloc_free(ids, is_buffer ? handle - ZINK_MAX_BINDLESS_HANDLES : handle);
}
}
/* queries must only be destroyed once they are inactive */
set_foreach_remove(&bs->active_queries, entry) {
struct zink_query *query = (void*)entry->key;
zink_prune_query(bs, query);
}
}
void