anv/descriptor_set: Destroy sets before pool finalization

Fixes: 105002bd2d "anv: destroy descriptor sets when pool gets..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand 2019-04-23 21:46:32 -05:00 committed by Dylan Baker
parent fa1bbc00a6
commit c8dbe93b0a

View file

@ -479,13 +479,13 @@ void anv_DestroyDescriptorPool(
if (!pool)
return;
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_finish(&pool->surface_state_stream);
vk_free2(&device->alloc, pAllocator, pool);
}