In the API-Samples that come with Vulkan, it appears that there is always a call to vkWaitForFences
after a call to vkQueueSubmit
, either directly or via execute_queue_command_buffer
(in util_init.hpp). The call to vkWaitForFences
will block the CPU execution until the GPU has finished doing all the work in the previous vkQueueSubmit
. This in effect doesn't allow multiple frames to be constructed simultaneously, which (in theory) is limiting performance significantly.
Are these calls required, and if so, is there another way to not require the GPU to be idle before constructing a new frame?