vulkan: fix clean up

We now don't do any more greedy waiting when destroying vulkan objects.
This commit is contained in:
niki
2022-07-29 22:59:15 +02:00
parent 524e011133
commit 1096b76054
6 changed files with 36 additions and 27 deletions
+4
View File
@@ -556,6 +556,10 @@ namespace love {
cleanUpFunctions.at(currentFrame).push_back(std::move(cleanUp));
}
void Graphics::queueCleanUp(std::function<void()> cleanUp) {
cleanUpFunctions.at(currentFrame).push_back(std::move(cleanUp));
}
VkCommandBuffer Graphics::beginSingleTimeCommands() {
VkCommandBufferAllocateInfo allocInfo{};
allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;