layers: Further descriptorSet cleanup fixes
Clear the pools list of sets when pool is reset.
Also make sure to remove sets from pool as they are freed.
Added a related fix to testing to correctly free descriptorSets
in DescriptorSetCompatibility test.
diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp
index 673a623..b8bd5b5 100644
--- a/tests/layer_validation_tests.cpp
+++ b/tests/layer_validation_tests.cpp
@@ -3568,7 +3568,8 @@
vkDestroyDescriptorSetLayout(m_device->device(), ds_layout[i], NULL);
}
vkDestroyDescriptorSetLayout(m_device->device(), ds_layout_fs_only, NULL);
- vkFreeDescriptorSets(m_device->device(), ds_pool, 1, descriptorSet);
+ vkFreeDescriptorSets(m_device->device(), ds_pool, 1, &ds0_fs_only);
+ vkFreeDescriptorSets(m_device->device(), ds_pool, NUM_SETS, descriptorSet);
vkDestroyBuffer(m_device->device(), dyub, NULL);
vkDestroyPipelineLayout(m_device->device(), pipeline_layout, NULL);
vkDestroyDescriptorPool(m_device->device(), ds_pool, NULL);