Free vulkan surface

This commit is contained in:
2023-09-27 03:12:11 +02:00
parent 3ffbaea37b
commit 1d8a7d7755
2 changed files with 3 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ namespace openVulkanoCpp::Vulkan
swapChainRenderPass.Close();
swapChain.Close();
deviceManager.Close();
vkDestroySurfaceKHR(static_cast<VkInstance>(instance), surface, nullptr);
//TODO
if (enableValidationLayer) Debug::CloseValidationLayers(instance);

View File

@@ -8,6 +8,7 @@
#include "Scene/Vertex.hpp"
#include "Scene/Geometry.hpp"
#include "Scene/Material.hpp"
#include "Math/ByteSize.hpp"
#include "Vulkan/Context.hpp"
#include "Vulkan/Scene/VulkanShader.hpp"
#include "Vulkan/Scene/VulkanGeometry.hpp"
@@ -336,7 +337,7 @@ namespace openVulkanoCpp::Vulkan
break;
}
}
if(!alloc && createIfAllFull) alloc = CreateMemoryAllocation(64 * 1024 * 1024, type, true);
if(!alloc && createIfAllFull) alloc = CreateMemoryAllocation(64_MiB, type, true);
if(alloc) lastAllocation = alloc;
return alloc;
}