summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-01 01:59:28 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-01 02:32:07 +0200
commit11774308d305537677454c5acddd7a5928a1275d (patch)
treef5b6f81632e24bc9382cf01534e88b3fc8c1c179 /src
parentrenderer_vulkan/wrapper: Add fence handle (diff)
downloadyuzu-11774308d305537677454c5acddd7a5928a1275d.tar
yuzu-11774308d305537677454c5acddd7a5928a1275d.tar.gz
yuzu-11774308d305537677454c5acddd7a5928a1275d.tar.bz2
yuzu-11774308d305537677454c5acddd7a5928a1275d.tar.lz
yuzu-11774308d305537677454c5acddd7a5928a1275d.tar.xz
yuzu-11774308d305537677454c5acddd7a5928a1275d.tar.zst
yuzu-11774308d305537677454c5acddd7a5928a1275d.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_vulkan/wrapper.cpp8
-rw-r--r--src/video_core/renderer_vulkan/wrapper.h7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/wrapper.cpp b/src/video_core/renderer_vulkan/wrapper.cpp
index d6fea3711..decb34a4c 100644
--- a/src/video_core/renderer_vulkan/wrapper.cpp
+++ b/src/video_core/renderer_vulkan/wrapper.cpp
@@ -460,4 +460,12 @@ CommandBuffers CommandPool::Allocate(std::size_t num_buffers, VkCommandBufferLev
}
}
+std::vector<VkImage> SwapchainKHR::GetImages() const {
+ u32 num;
+ Check(dld->vkGetSwapchainImagesKHR(owner, handle, &num, nullptr));
+ std::vector<VkImage> images(num);
+ Check(dld->vkGetSwapchainImagesKHR(owner, handle, &num, images.data()));
+ return images;
+}
+
} // namespace Vulkan::vk
diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h
index 96f498c13..d8976f3b0 100644
--- a/src/video_core/renderer_vulkan/wrapper.h
+++ b/src/video_core/renderer_vulkan/wrapper.h
@@ -647,4 +647,11 @@ public:
VkCommandBufferLevel level = VK_COMMAND_BUFFER_LEVEL_PRIMARY) const;
};
+class SwapchainKHR : public Handle<VkSwapchainKHR, VkDevice, DeviceDispatch> {
+ using Handle<VkSwapchainKHR, VkDevice, DeviceDispatch>::Handle;
+
+public:
+ std::vector<VkImage> GetImages() const;
+};
+
} // namespace Vulkan::vk