mirror of
https://github.com/love2d/love.git
synced 2026-08-20 20:49:54 +02:00
fix crash on resizing
This commit is contained in:
@@ -985,6 +985,12 @@ namespace love {
|
|||||||
|
|
||||||
cleanupSwapChain();
|
cleanupSwapChain();
|
||||||
|
|
||||||
|
for (size_t i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) {
|
||||||
|
vkDestroySemaphore(device, renderFinishedSemaphores[i], nullptr);
|
||||||
|
vkDestroySemaphore(device, imageAvailableSemaphores[i], nullptr);
|
||||||
|
vkDestroyFence(device, inFlightFences[i], nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
vkDestroyDescriptorPool(device, descriptorPool, nullptr);
|
vkDestroyDescriptorPool(device, descriptorPool, nullptr);
|
||||||
|
|
||||||
vkDestroyDescriptorSetLayout(device, descriptorSetLayout, nullptr);
|
vkDestroyDescriptorSetLayout(device, descriptorSetLayout, nullptr);
|
||||||
@@ -1006,11 +1012,6 @@ namespace love {
|
|||||||
vkDestroyImageView(device, swapChainImageViews[i], nullptr);
|
vkDestroyImageView(device, swapChainImageViews[i], nullptr);
|
||||||
}
|
}
|
||||||
vkDestroySwapchainKHR(device, swapChain, nullptr);
|
vkDestroySwapchainKHR(device, swapChain, nullptr);
|
||||||
for (size_t i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) {
|
|
||||||
vkDestroySemaphore(device, renderFinishedSemaphores[i], nullptr);
|
|
||||||
vkDestroySemaphore(device, imageAvailableSemaphores[i], nullptr);
|
|
||||||
vkDestroyFence(device, inFlightFences[i], nullptr);
|
|
||||||
}
|
|
||||||
uniformBuffers.clear();
|
uniformBuffers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1028,7 +1029,6 @@ namespace love {
|
|||||||
createDescriptorPool();
|
createDescriptorPool();
|
||||||
createDescriptorSets();
|
createDescriptorSets();
|
||||||
createCommandBuffers();
|
createCommandBuffers();
|
||||||
createSyncObjects();
|
|
||||||
startRecordingGraphicsCommands();
|
startRecordingGraphicsCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user