summaryrefslogtreecommitdiff
path: root/engine/xe_swap_chain.cpp
diff options
context:
space:
mode:
authortylermurphy534 <tylermurphy534@gmail.com>2022-09-27 21:40:20 -0400
committertylermurphy534 <tylermurphy534@gmail.com>2022-09-27 21:40:20 -0400
commit269263d88629c48027d71275dd778f7b01a569f1 (patch)
tree147f63e68d3941751b7bc4778a4bb745b8d88eba /engine/xe_swap_chain.cpp
parentprocedural chunk loading (diff)
downloadminecraftvulkan-269263d88629c48027d71275dd778f7b01a569f1.tar.gz
minecraftvulkan-269263d88629c48027d71275dd778f7b01a569f1.tar.bz2
minecraftvulkan-269263d88629c48027d71275dd778f7b01a569f1.zip
destroy buffers on fence
Diffstat (limited to 'engine/xe_swap_chain.cpp')
-rwxr-xr-xengine/xe_swap_chain.cpp5
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) {