[Mesa-dev] [PATCH] anv: destroy descriptor sets when pool gets reset

Clayton Craft clayton.a.craft at intel.com
Mon Mar 11 20:14:53 UTC 2019


On Mon, Mar 11, 2019 at 06:33:54PM +0100, Juan A. Suarez Romero wrote:
>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 descriptor set layouts")

I ran this though CI and these tests are no longer failing. I didn't see any
regressions either.


>CC: Tapani Pälli <tapani.palli at intel.com>
>CC: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>CC: Jason Ekstrand <jason at jlekstrand.net>
>---
> 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 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;
>-- 
>2.20.1
>
>_______________________________________________
>mesa-dev mailing list
>mesa-dev at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190311/a13b5142/attachment.sig>


More information about the mesa-dev mailing list