aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common/vulkan_device.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-06-27 11:21:36 -0400
committerGitHub <noreply@github.com>2023-06-27 11:21:36 -0400
commitc6959449d1e28f16d6eaf3a215f2bce5fab5ed0f (patch)
tree1ceac7222976e40bb12c3919cd3412d36b7ec93b /src/video_core/vulkan_common/vulkan_device.h
parent20111c86b65afef07923fdb2f15867b7f8c69e32 (diff)
parentb6c6dcc5760ebaf08460c176c42d1c4729e2eb21 (diff)
Merge pull request #10473 from GPUCode/vma
Use vulkan memory allocator
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.h')
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 0b634a876..b84af3dfb 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -14,6 +14,8 @@
#include "common/settings.h"
#include "video_core/vulkan_common/vulkan_wrapper.h"
+VK_DEFINE_HANDLE(VmaAllocator)
+
// Define all features which may be used by the implementation here.
// Vulkan version in the macro describes the minimum version required for feature availability.
// If the Vulkan version is lower than the required version, the named extension is required.
@@ -199,6 +201,11 @@ public:
return dld;
}
+ /// Returns the VMA allocator.
+ VmaAllocator GetAllocator() const {
+ return allocator;
+ }
+
/// Returns the logical device.
const vk::Device& GetLogical() const {
return logical;
@@ -630,6 +637,7 @@ private:
private:
VkInstance instance; ///< Vulkan instance.
+ VmaAllocator allocator; ///< VMA allocator.
vk::DeviceDispatch dld; ///< Device function pointers.
vk::PhysicalDevice physical; ///< Physical device.
vk::Device logical; ///< Logical device.