The article contains this text:
The VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag lets us implicitly reset command buffers when recording them.
https://docs.vulkan.org/refpages/latest/refpages/source/VkCommandPoolCreateFlagBits.html says (emphasis added):
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT allows any command buffer allocated from a pool to be individually reset to the initial state; either by calling vkResetCommandBuffer, or via the implicit reset when calling vkBeginCommandBuffer.
Both the code and the article use the pattern:
chk(vkResetCommandBuffer(cb, 0));
VkCommandBufferBeginInfo cbBI { .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, .flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT };
chk(vkBeginCommandBuffer(cb, &cbBI));
This is not an implicit reset, because vkResetCommandBuffer was called.
Suggestion: do one of these things:
- delete the text "The VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag lets us implicitly reset command buffers when recording them." and/or remove
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT from commandPoolCI.flags
- delete the call to
vkResetCommandBuffer
The article contains this text:
https://docs.vulkan.org/refpages/latest/refpages/source/VkCommandPoolCreateFlagBits.html says (emphasis added):
Both the code and the article use the pattern:
This is not an implicit reset, because
vkResetCommandBufferwas called.Suggestion: do one of these things:
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BITfromcommandPoolCI.flagsvkResetCommandBuffer