diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-29 07:34:17 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-08-20 21:55:22 +0200 |
commit | 29a0ca23918092d252f440b2f55f68bb3c991366 (patch) | |
tree | edda29a9afa40fa3167641a79ad324a073de4ad5 /src/video_core/renderer_vulkan/renderer_vulkan.cpp | |
parent | Merge pull request #4546 from lioncash/telemetry (diff) | |
download | yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.tar yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.tar.gz yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.tar.bz2 yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.tar.lz yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.tar.xz yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.tar.zst yuzu-29a0ca23918092d252f440b2f55f68bb3c991366.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/renderer_vulkan.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 6e49699d0..6f9eadbeb 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -180,7 +180,10 @@ vk::Instance CreateInstance(Common::DynamicLibrary& library, vk::InstanceDispatc } } - vk::Instance instance = vk::Instance::Create(layers, extensions, dld); + // Limit the maximum version of Vulkan to avoid using untested version. + const u32 version = std::min(vk::AvailableVersion(dld), static_cast<u32>(VK_API_VERSION_1_1)); + + vk::Instance instance = vk::Instance::Create(version, layers, extensions, dld); if (!instance) { LOG_ERROR(Render_Vulkan, "Failed to create Vulkan instance"); return {}; |