diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-27 10:47:07 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-05-27 10:50:48 +0200 |
commit | 19454e71d808da5bdfe4c4831ff85333a4514323 (patch) | |
tree | c8d259521c4ded09839a61f786fa802fffa28cc4 /src/video_core/vulkan_common/vulkan_memory_allocator.h | |
parent | Merge pull request #6366 from lat9nq/bundled-qt-linux (diff) | |
download | yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.tar yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.tar.gz yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.tar.bz2 yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.tar.lz yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.tar.xz yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.tar.zst yuzu-19454e71d808da5bdfe4c4831ff85333a4514323.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 | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.h b/src/video_core/vulkan_common/vulkan_memory_allocator.h index d1ce29450..db12d02f4 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.h +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.h @@ -101,16 +101,13 @@ public: MemoryCommit Commit(const vk::Image& image, MemoryUsage usage); private: - /// Allocates a chunk of memory. - void AllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u64 size); + /// Tries to allocate a chunk of memory. + bool TryAllocMemory(VkMemoryPropertyFlags flags, u32 type_mask, u64 size); /// Tries to allocate a memory commit. std::optional<MemoryCommit> TryCommit(const VkMemoryRequirements& requirements, VkMemoryPropertyFlags flags); - /// Returns the fastest compatible memory property flags from a wanted usage. - VkMemoryPropertyFlags MemoryPropertyFlags(u32 type_mask, MemoryUsage usage) const; - /// Returns the fastest compatible memory property flags from the wanted flags. VkMemoryPropertyFlags MemoryPropertyFlags(u32 type_mask, VkMemoryPropertyFlags flags) const; |