Sometimes we would like to wait until all the work submitted to all the logical devices' queues is finished. This type of wait is typically done before we close our application and we want to destroy all created or allocated resources.
Waiting for all submitted commands to be finished
How to do it...
- Take the handle of a created logical device and store it in a variable of type VkDevice named logical_device.
- Make the following call: vkDeviceWaitIdle( logical_device ), for which provide the handle of the logical device.
- You can check if there were no errors by comparing the returned value with a VK_SUCCESS.