Fix issue with freeing resources

This commit is contained in:
Georg Hagen
2024-07-11 13:22:01 +02:00
parent 22cb48be89
commit 313b01db1b
16 changed files with 300 additions and 156 deletions

View File

@@ -9,14 +9,16 @@
#define CRASH_ON_MULTIPLE_MAPPINGS_TO_SAME_ALLOCATION
#include "MemoryAllocation.hpp"
#include "MemoryPool.hpp"
#include <memory>
#include <functional>
namespace OpenVulkano::Vulkan
{
struct ManagedBuffer
class ManagedBuffer
{
using Ptr = std::unique_ptr<ManagedBuffer, std::function<void(ManagedBuffer*)>>;
public:
using Ptr = std::unique_ptr<ManagedBuffer, ManagedBufferDeleter>;
MemoryAllocation* allocation;
vk::DeviceSize offset, size;