vulkan: fix all memory leaks

Now now errors regarding resource management appear in the debug output / validation layers.
This commit is contained in:
niki
2022-07-11 13:58:35 +02:00
parent c5327bfc4f
commit 9d04ec0030
7 changed files with 42 additions and 13 deletions
+3 -1
View File
@@ -4,6 +4,7 @@
#include "graphics/Volatile.h"
#include "modules/graphics/StreamBuffer.h"
#include "vulkan/vulkan.h"
#include "graphics/Graphics.h"
#include "vk_mem_alloc.h"
@@ -12,7 +13,7 @@ namespace love {
namespace vulkan {
class StreamBuffer : public love::graphics::StreamBuffer, public graphics::Volatile {
public:
StreamBuffer(VmaAllocator allocator, BufferUsage mode, size_t size);
StreamBuffer(graphics::Graphics* gfx, BufferUsage mode, size_t size);
virtual ~StreamBuffer();
virtual bool loadVolatile() override;
@@ -30,6 +31,7 @@ namespace love {
}
private:
graphics::Graphics* gfx;
VmaAllocator allocator;
VmaAllocation allocation;
VmaAllocationInfo allocInfo;