No more shared pointers

This commit is contained in:
Dynamitos committed 2023-11-01 23:12:30 +01:00
1 parent 5a9cb13e74
commit 4746c0f838
69 files changed
+524 -681

No files matched your search

+5 -5
View File
@@ -95,11 +95,11 @@ public:
private:
VkDevice device;
Allocator *allocator;
PAllocator allocator;
VkDeviceSize bytesAllocated;
VkDeviceSize bytesUsed;
VkDeviceMemory allocatedMemory;
std::map<VkDeviceSize, SubAllocation *> activeAllocations;
std::map<VkDeviceSize, PSubAllocation> activeAllocations;
std::map<VkDeviceSize, PSubAllocation> freeRanges;
std::mutex lock;
void *mappedPointer;
@@ -118,9 +118,9 @@ class Allocator
public:
Allocator(PGraphics graphics);
~Allocator();
PSubAllocation allocate(const VkMemoryRequirements2 &requirements, VkMemoryPropertyFlags props,
OSubAllocation allocate(const VkMemoryRequirements2 &requirements, VkMemoryPropertyFlags props,
VkMemoryDedicatedAllocateInfo *dedicatedInfo = nullptr);
inline PSubAllocation allocate(const VkMemoryRequirements2 &requirements, VkMemoryPropertyFlags props,
OSubAllocation allocate(const VkMemoryRequirements2 &requirements, VkMemoryPropertyFlags props,
VkBuffer buffer)
{
VkMemoryDedicatedAllocateInfo allocInfo;
@@ -130,7 +130,7 @@ public:
allocInfo.image = VK_NULL_HANDLE;
return allocate(requirements, props, &allocInfo);
}
inline PSubAllocation allocate(const VkMemoryRequirements2 &requirements, VkMemoryPropertyFlags props,
OSubAllocation allocate(const VkMemoryRequirements2 &requirements, VkMemoryPropertyFlags props,
VkImage image)
{
VkMemoryDedicatedAllocateInfo allocInfo;