diff --git a/src/gfx_device_vulkan.cpp b/src/gfx_device_vulkan.cpp index 92e6ccc..656a52d 100644 --- a/src/gfx_device_vulkan.cpp +++ b/src/gfx_device_vulkan.cpp @@ -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];