diff options
author | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-27 21:40:20 -0400 |
---|---|---|
committer | tylermurphy534 <tylermurphy534@gmail.com> | 2022-09-27 21:40:20 -0400 |
commit | 269263d88629c48027d71275dd778f7b01a569f1 (patch) | |
tree | 147f63e68d3941751b7bc4778a4bb745b8d88eba /engine/xe_swap_chain.cpp | |
parent | procedural chunk loading (diff) | |
download | minecraftvulkan-269263d88629c48027d71275dd778f7b01a569f1.tar.gz minecraftvulkan-269263d88629c48027d71275dd778f7b01a569f1.tar.bz2 minecraftvulkan-269263d88629c48027d71275dd778f7b01a569f1.zip |
destroy buffers on fence
Diffstat (limited to 'engine/xe_swap_chain.cpp')
-rwxr-xr-x | engine/xe_swap_chain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engine/xe_swap_chain.cpp b/engine/xe_swap_chain.cpp index 67248f4..c631209 100755 --- a/engine/xe_swap_chain.cpp +++ b/engine/xe_swap_chain.cpp @@ -87,6 +87,9 @@ VkResult SwapChain::submitCommandBuffers( if (imagesInFlight[*imageIndex] != VK_NULL_HANDLE) { vkWaitForFences(device.device(), 1, &imagesInFlight[*imageIndex], VK_TRUE, UINT64_MAX); } + + Model::submitDeleteQueue(); + imagesInFlight[*imageIndex] = inFlightFences[currentFrame]; VkSubmitInfo submitInfo = {}; @@ -105,6 +108,8 @@ VkResult SwapChain::submitCommandBuffers( submitInfo.signalSemaphoreCount = 1; submitInfo.pSignalSemaphores = signalSemaphores; + + vkResetFences(device.device(), 1, &inFlightFences[currentFrame]); if (vkQueueSubmit(device.graphicsQueue(), 1, &submitInfo, inFlightFences[currentFrame]) != VK_SUCCESS) { |