diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-19 06:39:29 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-06-16 21:35:01 +0200 |
commit | 5b1efe522eac11a4f1b687981e0913e66818ca74 (patch) | |
tree | 04b236f667c39d0ad47faa8ae1b3edfbc90a85a5 /src/video_core/vulkan_common/vulkan_memory_allocator.h | |
parent | Merge pull request #6464 from ameerj/disable-astc (diff) | |
download | yuzu-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 'src/video_core/vulkan_common/vulkan_memory_allocator.h')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_memory_allocator.h | 5 |
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); |