summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2019-03-11 18:33:54 +0100
committerJason Ekstrand <[email protected]>2019-03-11 20:40:31 -0500
commit775aabdd01739c413da7b38e5acbde1094209bcf (patch)
tree8337490d9c090dec5d127412699a4d45bb153920
parent3235a942c16b61849bc16a710c53f0a7a5566f0d (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 <[email protected]> Tested-by: Clayton Craft <[email protected]>
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c6
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 f293cf469ee..f34a44aefd7 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -636,6 +636,12 @@ VkResult anv_ResetDescriptorPool(
}
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;