diff options
author | Danylo Piliaiev <danylo.piliaiev@globallogic.com> | 2019-03-12 17:13:47 +0200 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-03-12 15:10:14 -0700 |
commit | 3147af410ddd9efa3cf4215854d921e16d3cbf2c (patch) | |
tree | 738c5865cc8ef0a081e11d5cd5cca9aac28888b7 /src | |
parent | ffeb946c8a199bfbbc880614b7b57f151ad763af (diff) | |
download | mesa-3147af410ddd9efa3cf4215854d921e16d3cbf2c.tar.gz mesa-3147af410ddd9efa3cf4215854d921e16d3cbf2c.tar.bz2 mesa-3147af410ddd9efa3cf4215854d921e16d3cbf2c.zip |
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 9c80be956fff4d4786a9b77c6b9d3fec67ff2377)
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_descriptor_set.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_descriptor_set.c index 3e85aaaafd0..26fb9c9169a 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -497,15 +497,14 @@ VkResult anv_ResetDescriptorPool( ANV_FROM_HANDLE(anv_device, device, _device); ANV_FROM_HANDLE(anv_descriptor_pool, pool, descriptorPool); - pool->next = 0; - pool->free_list = EMPTY; - 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); } + pool->next = 0; + pool->free_list = EMPTY; + anv_state_stream_finish(&pool->surface_state_stream); anv_state_stream_init(&pool->surface_state_stream, &device->surface_state_pool, 4096); pool->surface_state_free_list = NULL; |