Function Prototype
vkResetCommandBuffer
Reset a command buffer to the initial state
To reset a command buffer, call:
VkResult vkResetCommandBuffer(
VkCommandBuffer commandBuffer,
VkCommandBufferResetFlags flags);
pub fn reset_command_buffer(
command_buffer: vk::CommandBuffer,
flags: vk::CommandBufferResetFlags,
) -> vk::Result;
commandBufferis the command buffer to reset. The command buffer can be in any state other than pending, and is moved into the initial state.flagsis a bitmask of VkCommandBufferResetFlagBits controlling the reset operation.
Any primary command buffer that is in the recording or executable state and has commandBuffer recorded into
it, becomes invalid.
After a command buffer is reset, any objects or memory specified by commands recorded into the command buffer must no longer be accessed when the command buffer is accessed by the implementation.
Valid Usage
VUID-vkResetCommandBuffer-commandBuffer-00045
commandBuffer must not be in the pending state
VUID-vkResetCommandBuffer-commandBuffer-00046
commandBuffer must have been allocated from a pool that was
created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
Valid Usage (Implicit)
VUID-vkResetCommandBuffer-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkResetCommandBuffer-flags-parameter
flags must be a valid combination of VkCommandBufferResetFlagBits values
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Parent
VK_VERSION_1_0Type
Function Prototype
Return Values
VK_SUCCESS
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_UNKNOWN
VK_ERROR_VALIDATION_FAILED