Mesa (master): anv: Fix destroying descriptor sets when pool gets reset
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Mar 12 17:09:55 UTC 2019
Module: Mesa
Branch: master
Commit: 9c80be956fff4d4786a9b77c6b9d3fec67ff2377
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c80be956fff4d4786a9b77c6b9d3fec67ff2377
Author: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Date: Tue Mar 12 17:13:47 2019 +0200
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 at globallogic.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/intel/vulkan/anv_descriptor_set.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c
index f34a44aefd7..a648105970d 100644
--- a/src/intel/vulkan/anv_descriptor_set.c
+++ b/src/intel/vulkan/anv_descriptor_set.c
@@ -627,6 +627,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;
@@ -636,12 +641,6 @@ 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;
More information about the mesa-commit
mailing list