venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT

When a pool is reset with VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT,
free up all query batches in the pool.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
This commit is contained in:
Juston Li 2024-01-22 12:53:48 -08:00 committed by Marge Bot
parent aceda1f5f6
commit e2c4bafccc

View file

@ -788,6 +788,12 @@ vn_ResetCommandPool(VkDevice device,
&pool->command_buffers, head)
vn_cmd_reset(cmd);
if (flags & VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT) {
list_for_each_entry_safe(struct vn_feedback_query_batch, batch,
&pool->free_query_batches, head)
vk_free(&pool->allocator, batch);
}
vn_async_vkResetCommandPool(dev->primary_ring, device, commandPool, flags);
return VK_SUCCESS;