summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-01 01:28:33 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-01 02:32:07 +0200
commitaffee77b7054cbc9cdd38806e12138dab0ce3d06 (patch)
treef9de3be35cf8a4b489af92e41458fd6631e28652 /src
parentrenderer_vulkan/wrapper: Add queue handle (diff)
downloadyuzu-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.cpp8
-rw-r--r--src/video_core/renderer_vulkan/wrapper.h16
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