Function Prototype

vkBeginCommandBuffer

Start recording a command buffer

To begin recording a command buffer, call:

VkResult vkBeginCommandBuffer(
    VkCommandBuffer commandBuffer,
    const VkCommandBufferBeginInfo* pBeginInfo);
  • commandBuffer is the handle of the command buffer which is to be put in the recording state.
  • pBeginInfo is a pointer to a VkCommandBufferBeginInfo structure defining additional information about how the command buffer begins recording.

Valid Usage

VUID-vkBeginCommandBuffer-commandBuffer-00050

If commandBuffer was allocated from a VkCommandPool which did not have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, commandBuffer must be in the initial state

VUID-vkBeginCommandBuffer-commandBuffer-00051

If commandBuffer is a secondary command buffer, the pInheritanceInfo member of pBeginInfo must be a valid VkCommandBufferInheritanceInfo structure

VUID-vkBeginCommandBuffer-commandBuffer-00052

If commandBuffer is a secondary command buffer and either the occlusionQueryEnable member of the pInheritanceInfo member of pBeginInfo is VK_FALSE, or the occlusionQueryPrecise feature is not enabled, then pBeginInfo→pInheritanceInfo→queryFlagsmust not contain VK_QUERY_CONTROL_PRECISE_BIT

VUID-vkBeginCommandBuffer-commandBuffer-02840

If commandBuffer is a primary command buffer, then pBeginInfo→flags must not set both the VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT and the VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flags

Valid Usage (Implicit)

VUID-vkBeginCommandBuffer-pBeginInfo-parameter

pBeginInfo must be a valid pointer to a valid VkCommandBufferBeginInfo structure

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized ::