anv/descriptor_set: Only vma_heap_finish if we have a descriptor buffer

Fixes: 7bb34ecff9 "anv: release memory allocated by bo_heap when..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2019-04-23 21:35:30 -05:00
parent 0bc1942c9d
commit 3d33c13eca

View File

@@ -754,11 +754,10 @@ void anv_DestroyDescriptorPool(
anv_gem_munmap(pool->bo.map, pool->bo.size);
anv_vma_free(device, &pool->bo);
anv_gem_close(device, pool->bo.gem_handle);
util_vma_heap_finish(&pool->bo_heap);
}
anv_state_stream_finish(&pool->surface_state_stream);
util_vma_heap_finish(&pool->bo_heap);
vk_free2(&device->alloc, pAllocator, pool);
}