When we don't want to reset command buffers individually, or if we created a pool without a VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag, we can reset all command buffers allocated from a given pool at once.
Resetting a command pool
How to do it...
- Take the handle of a logical device and store it in a variable of type VkDevice named logical_device.
- Take the handle of a created command pool. Use it to initialize a variable of type VkCommandPool named command_pool.
- Create a variable of type VkCommandPoolResetFlags named release_resources and initialize it with a value of VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT, if memory reserved by all command buffers allocated from the command pool should be released and returned to the pool, or with a 0 value otherwise...