Recording command buffers
A command buffer is recorded using the vkBeginCommandBuffer()
and vkEndCommandBuffer()
APIs. These APIs define the scope under which any specified Vulkan commands are recorded. The following example shows the recording of the Render Pass instance creation between these two APIs, which works as the start and end scopes. For more information on creating a Render Pass, refer to the Understanding the Render Pass section in Chapter 7, Buffer Resource, Render Pass, Framebuffer, and Shaders with SPIR-V.
The start of the recording is performed using the vkBeginCommandBuffer()
API. This defines the starting scope after which any call specified is considered to be recorded until the end scope is reached (vkEndCommandBuffer()
).
The following is the syntax of this API, followed by a description of the necessary parameters:
VkResult vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
This...