[vulkan] Update the active command buffer indices

When creating a new command buffer and appending it to a queue, the
active buffer count needs to be incremented too otherwise the new
command buffer will be accidentally reused prematurely. Not noticed
earlier because only one buffer was being created.
This commit is contained in:
Bill Currie 2023-06-22 19:06:12 +09:00
parent 3c9bd77346
commit 836290aa74

View file

@ -109,8 +109,10 @@ QFV_CmdPoolManager_CmdBuffer (qfv_cmdpoolmgr_t *manager, bool secondary)
dfunc->vkAllocateCommandBuffers (device->dev, &cinfo, &cmd);
if (secondary) {
DARRAY_APPEND (&manager->secondary, cmd);
manager->active_secondary++;
} else {
DARRAY_APPEND (&manager->primary, cmd);
manager->active_primary++;
}
return cmd;
}