summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/wrapper.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h
index d1a355144..16d208649 100644
--- a/src/video_core/renderer_vulkan/wrapper.h
+++ b/src/video_core/renderer_vulkan/wrapper.h
@@ -600,6 +600,21 @@ public:
600 void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const; 600 void BindMemory(VkDeviceMemory memory, VkDeviceSize offset) const;
601}; 601};
602 602
603class DeviceMemory : public Handle<VkDeviceMemory, VkDevice, DeviceDispatch> {
604 using Handle<VkDeviceMemory, VkDevice, DeviceDispatch>::Handle;
605
606public:
607 u8* Map(VkDeviceSize offset, VkDeviceSize size) const {
608 void* data;
609 Check(dld->vkMapMemory(owner, handle, offset, size, 0, &data));
610 return static_cast<u8*>(data);
611 }
612
613 void Unmap() const noexcept {
614 dld->vkUnmapMemory(owner, handle);
615 }
616};
617
603class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> { 618class DescriptorPool : public Handle<VkDescriptorPool, VkDevice, DeviceDispatch> {
604 using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle; 619 using Handle<VkDescriptorPool, VkDevice, DeviceDispatch>::Handle;
605 620