diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_instance.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/vulkan_common/vulkan_instance.cpp b/src/video_core/vulkan_common/vulkan_instance.cpp index 889ecda0c..bfd6e6add 100644 --- a/src/video_core/vulkan_common/vulkan_instance.cpp +++ b/src/video_core/vulkan_common/vulkan_instance.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <future> | ||
| 6 | #include <optional> | 7 | #include <optional> |
| 7 | #include <span> | 8 | #include <span> |
| 8 | #include <utility> | 9 | #include <utility> |
| @@ -140,7 +141,10 @@ vk::Instance CreateInstance(const Common::DynamicLibrary& library, vk::InstanceD | |||
| 140 | VK_VERSION_MAJOR(required_version), VK_VERSION_MINOR(required_version)); | 141 | VK_VERSION_MAJOR(required_version), VK_VERSION_MINOR(required_version)); |
| 141 | throw vk::Exception(VK_ERROR_INCOMPATIBLE_DRIVER); | 142 | throw vk::Exception(VK_ERROR_INCOMPATIBLE_DRIVER); |
| 142 | } | 143 | } |
| 143 | vk::Instance instance = vk::Instance::Create(required_version, layers, extensions, dld); | 144 | vk::Instance instance = |
| 145 | std::async([&] { | ||
| 146 | return vk::Instance::Create(required_version, layers, extensions, dld); | ||
| 147 | }).get(); | ||
| 144 | if (!vk::Load(*instance, dld)) { | 148 | if (!vk::Load(*instance, dld)) { |
| 145 | LOG_ERROR(Render_Vulkan, "Failed to load Vulkan instance function pointers"); | 149 | LOG_ERROR(Render_Vulkan, "Failed to load Vulkan instance function pointers"); |
| 146 | throw vk::Exception(VK_ERROR_INITIALIZATION_FAILED); | 150 | throw vk::Exception(VK_ERROR_INITIALIZATION_FAILED); |