Restructure some files regarding resource management

This commit is contained in:
Georg Hagen
2024-07-10 16:11:36 +02:00
parent 5c4e972722
commit ba7f0e6d62
9 changed files with 114 additions and 98 deletions

View File

@@ -5,10 +5,13 @@
*/
#include "ResourceManager.hpp"
#include "ManagedBuffer.hpp"
#include "MemoryAllocation.hpp"
#include "Scene/Vertex.hpp"
#include "Scene/Geometry.hpp"
#include "Scene/Material.hpp"
#include "Scene/UniformBuffer.hpp"
#include "Scene/Camera.hpp"
#include "Math/ByteSize.hpp"
#include "Vulkan/Context.hpp"
#include "Vulkan/Image.hpp"
@@ -91,7 +94,6 @@ namespace OpenVulkano::Vulkan
nodes.clear();
device.destroyDescriptorPool(descriptorPool);
allocations.clear();
lastAllocation = nullptr;
toFree.clear();
recycleBuffers.clear();
descriptorSetLayoutCache.clear();
@@ -372,7 +374,6 @@ namespace OpenVulkano::Vulkan
}
}
if(!alloc && createIfAllFull) alloc = CreateMemoryAllocation(64_MiB, type, true);
if(alloc) lastAllocation = alloc;
return alloc;
}