summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common/vulkan_memory_allocator.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-01-19 06:39:29 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-06-16 21:35:01 +0200
commit5b1efe522eac11a4f1b687981e0913e66818ca74 (patch)
tree04b236f667c39d0ad47faa8ae1b3edfbc90a85a5 /src/video_core/vulkan_common/vulkan_memory_allocator.h
parentMerge pull request #6464 from ameerj/disable-astc (diff)
downloadyuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.tar
yuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.tar.gz
yuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.tar.bz2
yuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.tar.lz
yuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.tar.xz
yuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.tar.zst
yuzu-5b1efe522eac11a4f1b687981e0913e66818ca74.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/vulkan_common/vulkan_memory_allocator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.h b/src/video_core/vulkan_common/vulkan_memory_allocator.h
index db12d02f4..b61e931e0 100644
--- a/src/video_core/vulkan_common/vulkan_memory_allocator.h
+++ b/src/video_core/vulkan_common/vulkan_memory_allocator.h
@@ -69,6 +69,8 @@ private:
/// Memory allocator container.
/// Allocates and releases memory allocations on demand.
class MemoryAllocator {
+ friend MemoryAllocation;
+
public:
/**
* Construct memory allocator
@@ -104,6 +106,9 @@ private:
/// Tries to allocate a chunk of memory.
bool TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u64 size);
+ /// Releases a chunk of memory.
+ void ReleaseMemory(MemoryAllocation* alloc);
+
/// Tries to allocate a memory commit.
std::optional<MemoryCommit> TryCommit(const VkMemoryRequirements& requirements,
VkMemoryPropertyFlags flags);