Startet to terribly implement a list

This commit is contained in:
Dynamitos
2020-03-13 12:44:33 +01:00
parent 80b57f5134
commit a5473409c1
21 changed files with 1034 additions and 104 deletions
@@ -0,0 +1,43 @@
#pragma once
#include "MinimalEngine.h"
#include "VulkanGraphicsEnums.h"
#include "Containers/Map.h"
#include "Containers/Array.h"
namespace Seele
{
DECLARE_REF(VulkanGraphics);
class VulkanSubAllocation
{
};
DEFINE_REF(VulkanSubAllocation);
class VulkanAllocation
{
private:
VkDeviceMemory allocatedMemory;
VkDeviceSize bytesAllocated;
VkDeviceSize bytesUsed;
uint8 isDedicated;
};
DEFINE_REF(VulkanAllocation);
class VulkanAllocator
{
public:
VulkanAllocator(PVulkanGraphics graphics);
~VulkanAllocator();
PVulkanSubAllocation allocate(uint64 size, VkMemoryPropertyFlags properties);
private:
struct HeapInfo
{
uint32 maxSize = 0;
Array<VulkanAllocation> allocations;
Array<VkMemoryType> types;
};
Array<HeapInfo> heaps;
PVulkanGraphics graphics;
VkPhysicalDeviceMemoryProperties memProperties;
};
DEFINE_REF(VulkanAllocator);
}