diff --git a/src/VkBootstrap.cpp b/src/VkBootstrap.cpp index f331ad3..e3cfd3e 100644 --- a/src/VkBootstrap.cpp +++ b/src/VkBootstrap.cpp @@ -602,13 +602,9 @@ detail::Result InstanceBuilder::build() const { uint32_t api_version = instance_version < VKB_VK_API_VERSION_1_1 ? instance_version : info.required_api_version; - if (info.desired_api_version > VKB_VK_API_VERSION_1_0) { - if (instance_version > info.desired_api_version) { - instance_version = info.desired_api_version; - } - if (api_version > info.desired_api_version) { - api_version = info.desired_api_version; - } + if (info.desired_api_version > VKB_VK_API_VERSION_1_0 && instance_version >= info.desired_api_version) { + instance_version = info.desired_api_version; + api_version = info.desired_api_version; } VkApplicationInfo app_info = {};