Cleanup memory pool data on close

This commit is contained in:
Georg Hagen
2024-07-11 16:56:26 +02:00
parent 0fda5a0241
commit 888e30193b
3 changed files with 24 additions and 8 deletions

View File

@@ -35,12 +35,14 @@ namespace OpenVulkano::Vulkan
public:
using ManagedBufferPtr = std::unique_ptr<ManagedBuffer, ManagedBufferDeleter>;
MemoryPool();
MemoryPool() = default;
~MemoryPool();
void Init(Device* dev, int bufferCount);
void Close();
void StartFrame(uint64_t bufferId);
MemoryAllocation* CreateMemoryAllocation(size_t size, uint32_t type, bool addToCache = true);