mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
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: 14f6275c92 "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 775aabdd01)
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 9c80be956f)
This commit is contained in:
parent
dfcae38dcc
commit
d88857823f
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue