We can free all descriptor sets allocated from a given pool at once without destroying the pool itself. To do that, we can reset a descriptor pool.
Resetting a descriptor pool
How to do it...
- Take the descriptor pool that should be reset and use its handle to initialize a variable of type VkDescriptorPool named descriptor_pool.
- Take the handle of a logical device on which the descriptor pool was created. Store its handle in a variable of type VkDevice named logical_device.
- Make the following call: vkResetDescriptorPool( logical_device, descriptor_pool, 0 ), for which use the logical_device and descriptor_pool variables and a 0 value.
- Check for any error returned by the call. As successful operation should return VK_SUCCESS.