diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 01:28:33 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 02:32:07 +0200 |
commit | affee77b7054cbc9cdd38806e12138dab0ce3d06 (patch) | |
tree | f9de3be35cf8a4b489af92e41458fd6631e28652 /src | |
parent | renderer_vulkan/wrapper: Add queue handle (diff) | |
download | yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.tar yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.tar.gz yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.tar.bz2 yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.tar.lz yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.tar.xz yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.tar.zst yuzu-affee77b7054cbc9cdd38806e12138dab0ce3d06.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/wrapper.cpp | 8 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/wrapper.h | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/wrapper.cpp b/src/video_core/renderer_vulkan/wrapper.cpp index 1ec7a542d..84a4c354f 100644 --- a/src/video_core/renderer_vulkan/wrapper.cpp +++ b/src/video_core/renderer_vulkan/wrapper.cpp @@ -420,4 +420,12 @@ std::vector<VkCheckpointDataNV> Queue::GetCheckpointDataNV(const DeviceDispatch& return checkpoints; } +void Buffer::BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const { + Check(dld->vkBindBufferMemory(owner, handle, memory, offset)); +} + +void Image::BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const { + Check(dld->vkBindImageMemory(owner, handle, memory, offset)); +} + } // namespace Vulkan::vk diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h index a4077136b..c6d7cbb3f 100644 --- a/src/video_core/renderer_vulkan/wrapper.h +++ b/src/video_core/renderer_vulkan/wrapper.h @@ -584,4 +584,20 @@ private: const DeviceDispatch* dld = nullptr; }; +class Buffer : public Handle<VkBuffer, VkDevice, DeviceDispatch> { + using Handle<VkBuffer, VkDevice, DeviceDispatch>::Handle; + +public: + /// Attaches a memory allocation. + void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const; +}; + +class Image : public Handle<VkImage, VkDevice, DeviceDispatch> { + using Handle<VkImage, VkDevice, DeviceDispatch>::Handle; + +public: + /// Attaches a memory allocation. + void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const; +}; + } // namespace Vulkan::vk |