mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[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:
parent
3c9bd77346
commit
836290aa74
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue