How can I continue a Vulkan command buffer recording without it being reset automatically?

Viewed 127

When I create a command pool and I specify the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag in the creation info then whenever I call vkBeginCommandBuffer it's automatically reset, meaning I can't end the command buffer and then continue recording by calling vkBeginCommandBuffer.

On the other hand, if I don't specify the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit, then I can't individually reset any command buffer allocated from that pool I created without that bit:

Attempt to reset VkCommandBuffer 0x2605587f260[] created from VkCommandPool 0x948acd0000000008[] that does NOT have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT bit set. The Vulkan spec states: commandBuffer must have been allocated from a pool that was created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT

I assume that if the bit isn't set the only way of resetting a particular command buffer is by resetting the command pool, which resets ALL the command buffers allocated from that pool. If I want a way of resetting an individual command buffer does that mean I must have that flag set? If so, that means that whenever I call vkBeginCommandBuffer it'll automatically reset the buffer. Is this what you want? Are there times when you don't want it? It seems like I don't have control to continue without resetting in that case.

0 Answers
Related