diff options
author | Juan A. Suarez Romero <jasuarez@igalia.com> | 2019-03-11 18:33:54 +0100 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-03-12 15:10:14 -0700 |
commit | ffeb946c8a199bfbbc880614b7b57f151ad763af (patch) | |
tree | c6e0522255350d1a8ae9b1a196a8ca5b6ea9b8db | |
parent | ef8a38e0e689809a88364c574a57893368062931 (diff) |
anv: destroy descriptor sets when pool gets reset
As stated in Vulkan spec:
"Resetting a descriptor pool recycles all of the resources from all
of the descriptor sets allocated from the descriptor pool back to
the descriptor pool, and the descriptor sets are implicitly freed."
This fixes dEQP-VK.api.descriptor_pool.*
Fixes: 14f6275c92f1 "anv/descriptor_set: add reference counting for..."
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Clayton Craft <clayton.a.craft@intel.com>
(cherry picked from commit 775aabdd01739c413da7b38e5acbde1094209bcf)
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 587e2132fca..3e85aaaafd0 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -500,6 +500,12 @@ VkResult anv_ResetDescriptorPool( pool->next = 0; pool->free_list = EMPTY; anv_state_stream_finish(&pool->surface_state_stream); + + list_for_each_entry_safe(struct anv_descriptor_set, set, + &pool->desc_sets, pool_link) { + anv_descriptor_set_destroy(device, pool, set); + } + anv_state_stream_init(&pool->surface_state_stream, &device->surface_state_pool, 4096); pool->surface_state_free_list = NULL; |