summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorDanylo Piliaiev <[email protected]>2019-03-12 17:13:47 +0200
committerLionel Landwerlin <[email protected]>2019-03-12 17:09:37 +0000
commit9c80be956fff4d4786a9b77c6b9d3fec67ff2377 (patch)
tree86e1322b676cd4455f6a3f37c697c3023f53ac23 /src/intel/vulkan
parentccce9409470c1053c40c822d759b9bd417062bc0 (diff)
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_descriptor_set.c11
1 files 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;