Mesa (staging/19.0): anv: destroy descriptor sets when pool gets reset

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 12 16:47:30 UTC 2019


Module: Mesa
Branch: staging/19.0
Commit: e9b4ec7099af0618fc99ce3c074737399d5f2693
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9b4ec7099af0618fc99ce3c074737399d5f2693

Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date:   Mon Mar 11 18:33:54 2019 +0100

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 at jlekstrand.net>
Tested-by: Clayton Craft <clayton.a.craft at intel.com>
(cherry picked from commit 775aabdd01739c413da7b38e5acbde1094209bcf)

---

 src/intel/vulkan/anv_descriptor_set.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index 988acdd0914..d52657746c8 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;




More information about the mesa-commit mailing list