diff options
author | Juan A. Suarez Romero <jasuarez@igalia.com> | 2019-03-11 18:33:54 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2019-03-14 19:03:56 +0000 |
commit | d88857823f0f18020f1005b3e8c8a3271ba71f53 (patch) | |
tree | c049f7adaaebfcd38fb0e2e56c4e32bd302db227 | |
parent | dfcae38dcc65de76a828c7a1e31b0789f5c7016b (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)
Squashed with:
anv: Fix destroying descriptor sets when pool gets reset
pool->next and pool->free_list were reset before their usage in
anv_descriptor_pool_free_set
Fixes: 775aabdd "anv: destroy descriptor sets when pool gets reset"
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 9c80be956fff4d4786a9b77c6b9d3fec67ff2377)
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 36a25273576..43e0f49f4b8 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -497,6 +497,11 @@ VkResult anv_ResetDescriptorPool( ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_descriptor_pool, pool, descriptorPool); + list_for_each_entry_safe(struct anv_descriptor_set, set, + &pool->desc_sets, pool_link) { + anv_descriptor_set_destroy(device, pool, set); + } + pool->next = 0; pool->free_list = EMPTY; anv_state_stream_finish(&pool->surface_state_stream); |