diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 02:30:19 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-01 02:32:08 +0200 |
commit | f22f6b72c3ebef386abdce2efbc829a8113e8b9b (patch) | |
tree | 5063fa4f3fa135b6c320ac5ba57c9bac9b4c959f | |
parent | renderer_vulkan/wrapper: Add command buffer handle (diff) | |
download | yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.tar yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.tar.gz yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.tar.bz2 yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.tar.lz yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.tar.xz yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.tar.zst yuzu-f22f6b72c3ebef386abdce2efbc829a8113e8b9b.zip |
-rw-r--r-- | src/video_core/renderer_vulkan/wrapper.cpp | 14 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/wrapper.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/wrapper.cpp b/src/video_core/renderer_vulkan/wrapper.cpp index 242cfff6e..9b94dfff1 100644 --- a/src/video_core/renderer_vulkan/wrapper.cpp +++ b/src/video_core/renderer_vulkan/wrapper.cpp @@ -733,4 +733,18 @@ VkPhysicalDeviceMemoryProperties PhysicalDevice::GetMemoryProperties() const noe return properties; } +std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProperties( + const InstanceDispatch& dld) { + u32 num; + if (dld.vkEnumerateInstanceExtensionProperties(nullptr, &num, nullptr) != VK_SUCCESS) { + return std::nullopt; + } + std::vector<VkExtensionProperties> properties(num); + if (dld.vkEnumerateInstanceExtensionProperties(nullptr, &num, properties.data()) != + VK_SUCCESS) { + return std::nullopt; + } + return properties; +} + } // namespace Vulkan::vk diff --git a/src/video_core/renderer_vulkan/wrapper.h b/src/video_core/renderer_vulkan/wrapper.h index 1f91cceb2..fb3657819 100644 --- a/src/video_core/renderer_vulkan/wrapper.h +++ b/src/video_core/renderer_vulkan/wrapper.h @@ -981,4 +981,7 @@ private: const DeviceDispatch* dld; }; +std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProperties( + const InstanceDispatch& dld); + } // namespace Vulkan::vk |