Merge pull request #7006 from FernandoS27/a-motherfucking-driver

Vulkan: Blacklist Int8Float16 Extension on AMD on driver 21.9.1
master
Morph 2021-09-13 17:25:56 +07:00 committed by GitHub
commit 62e88d0e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

@ -243,6 +243,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
SetupFamilies(surface); SetupFamilies(surface);
SetupFeatures(); SetupFeatures();
SetupProperties(); SetupProperties();
CollectTelemetryParameters();
const auto queue_cis = GetDeviceQueueCreateInfos(); const auto queue_cis = GetDeviceQueueCreateInfos();
const std::vector extensions = LoadExtensions(surface != nullptr); const std::vector extensions = LoadExtensions(surface != nullptr);
@ -368,6 +369,18 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
}; };
SetNext(next, demote); SetNext(next, demote);
if (driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE) {
const u32 version = properties.driverVersion;
// Broken in this driver
if (version > VK_MAKE_API_VERSION(0, 2, 0, 193)) {
LOG_WARNING(Render_Vulkan, "AMD proprietary driver versions newer than 21.9.1 "
"(windows) / 0.2.0.194 (amdvlk) have "
"broken VkPhysicalDeviceFloat16Int8FeaturesKHR");
is_int8_supported = false;
is_float16_supported = false;
}
}
if (is_int8_supported || is_float16_supported) { if (is_int8_supported || is_float16_supported) {
VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8{ VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8{
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR,
@ -560,7 +573,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld); logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld);
CollectPhysicalMemoryInfo(); CollectPhysicalMemoryInfo();
CollectTelemetryParameters();
CollectToolingInfo(); CollectToolingInfo();
if (driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR) { if (driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR) {