File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,19 @@ VkResult CreateInfoWrapper::SanitizeApiVersion() {
439439 if (!is_instance_ || !instance_info_.pApplicationInfo )
440440 return VK_SUCCESS;
441441
442+ // certain 1.3 icds in the wild may misbehave if the app requests
443+ // the 1.4 instance api. since there are no actual instance api
444+ // differences between these versions, downgrade the instance api
445+ // to 1.3 for such icds.
446+ if (icd_api_version_ >= VK_API_VERSION_1_3 &&
447+ icd_api_version_ < VK_API_VERSION_1_4 &&
448+ instance_info_.pApplicationInfo ->apiVersion >= VK_API_VERSION_1_4) {
449+ application_info_ = *instance_info_.pApplicationInfo ;
450+ application_info_.apiVersion = icd_api_version_;
451+ instance_info_.pApplicationInfo = &application_info_;
452+ return VK_SUCCESS;
453+ }
454+
442455 if (icd_api_version_ > VK_API_VERSION_1_0 ||
443456 instance_info_.pApplicationInfo ->apiVersion < VK_API_VERSION_1_1)
444457 return VK_SUCCESS;
You can’t perform that action at this time.
0 commit comments