Fix desire_api_version broken by previous commit

This commit is contained in:
Danderaion 2022-02-27 15:09:50 +02:00 committed by Charles Giessen
parent f6c262c3ab
commit f4d3f916f1

View File

@ -602,13 +602,9 @@ detail::Result<Instance> 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 = {};