To submit command buffers to a queue, call:
// Provided by VK_VERSION_1_3 VkResult vkQueueSubmit2( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence);
or the equivalent command
// Provided by VK_KHR_synchronization2 VkResult vkQueueSubmit2KHR( VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence);
queueis the queue that the command buffers will be submitted to.
submitCountis the number of elements in the
pSubmitsis a pointer to an array of VkSubmitInfo2 structures, each specifying a command buffer submission batch.
vkQueueSubmit2 is a queue submission
command, with each batch defined by an element of
Semaphore operations submitted with vkQueueSubmit2 have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the semaphore section of the synchronization chapter.
If any command buffer submitted to this queue is in the
executable state, it is moved to the
Once execution of all submissions of a command buffer complete, it moves
from the pending state, back to the
If a command buffer was recorded with the
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag, it instead moves
back to the invalid state.
vkQueueSubmit2 fails, it may return
If it does, the implementation must ensure that the state and contents of
any resources or synchronization primitives referenced by the submitted
command buffers and any semaphores referenced by
unaffected by the call or its failure.
vkQueueSubmit2 fails in such a way that the implementation is
unable to make that guarantee, the implementation must return
See Lost Device.
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.