[vk] check that adapters are Vulkan compliant (#4718)

This commit is contained in:
Teodor Tanasoaia 2023-11-17 23:42:53 +01:00 committed by GitHub
parent c9ae35edbb
commit 666f681dae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -986,6 +986,15 @@ impl super::Instance {
);
};
if let Some(driver) = phd_capabilities.driver {
if driver.conformance_version.major == 0 {
log::warn!(
"Adapter is not Vulkan compliant, hiding adapter: {}",
info.name
);
return None;
}
}
if phd_capabilities.device_api_version == vk::API_VERSION_1_0
&& !phd_capabilities.supports_extension(vk::KhrStorageBufferStorageClassFn::name())
{