diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-12-25 06:27:57 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-12-31 06:07:33 +0100 |
commit | 085adfea00a525796a3bf4b2dd345e1df656c930 (patch) | |
tree | f606a6c4fb19bf3207e9fe36b692c7c17d3fcca9 /src/video_core/vulkan_common/vulkan_wrapper.cpp | |
parent | renderer_vulkan: Initialize surface in separate file (diff) | |
download | yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.tar yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.tar.gz yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.tar.bz2 yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.tar.lz yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.tar.xz yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.tar.zst yuzu-085adfea00a525796a3bf4b2dd345e1df656c930.zip |
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_wrapper.cpp')
-rw-r--r-- | src/video_core/vulkan_common/vulkan_wrapper.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp index f4177537b..8698c3f92 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.cpp +++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp @@ -465,17 +465,13 @@ Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char return Instance(instance, dispatch); } -std::optional<std::vector<VkPhysicalDevice>> Instance::EnumeratePhysicalDevices() const { +std::vector<VkPhysicalDevice> Instance::EnumeratePhysicalDevices() const { u32 num; - if (dld->vkEnumeratePhysicalDevices(handle, &num, nullptr) != VK_SUCCESS) { - return std::nullopt; - } + Check(dld->vkEnumeratePhysicalDevices(handle, &num, nullptr)); std::vector<VkPhysicalDevice> physical_devices(num); - if (dld->vkEnumeratePhysicalDevices(handle, &num, physical_devices.data()) != VK_SUCCESS) { - return std::nullopt; - } + Check(dld->vkEnumeratePhysicalDevices(handle, &num, physical_devices.data())); SortPhysicalDevices(physical_devices, *dld); - return std::make_optional(std::move(physical_devices)); + return physical_devices; } DebugUtilsMessenger Instance::CreateDebugUtilsMessenger( |