reset transient command pools before any rendering

This commit is contained in:
Bailey Harrison 2023-03-30 14:10:22 +01:00
parent 938633d944
commit 424d22cf69

View File

@ -548,6 +548,12 @@ namespace engine {
{
VkResult res;
if (pimpl->FRAMECOUNT == 0) {
// perform clean-up before any rendering
vkResetCommandPool(pimpl->device.device, pimpl->transferCommandPool, VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT);
vkResetCommandPool(pimpl->device.device, pimpl->graphicsCommandPool, VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT);
}
const uint32_t currentFrameIndex = pimpl->FRAMECOUNT % FRAMES_IN_FLIGHT;
const FrameData frameData = pimpl->frameData[currentFrameIndex];