From 5601e1cb00159c03266b574cd2433e9cc0cb3209 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Thu, 16 Sep 2021 00:51:22 -0400 Subject: [PATCH 1/2] Revert "Merge pull request #7006 from FernandoS27/a-motherfucking-driver" This reverts commit 62e88d0e7455e37840db7e2a8e199bc6ca176966, reversing changes made to edf3da346f4ec0ca492b427f4f693d56e84abc52. --- src/video_core/vulkan_common/vulkan_device.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 24fb50db9..910e63a25 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -243,7 +243,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR SetupFamilies(surface); SetupFeatures(); SetupProperties(); - CollectTelemetryParameters(); const auto queue_cis = GetDeviceQueueCreateInfos(); const std::vector extensions = LoadExtensions(surface != nullptr); @@ -369,18 +368,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; 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) { VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, @@ -573,6 +560,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR logical = vk::Device::Create(physical, queue_cis, extensions, first_next, dld); CollectPhysicalMemoryInfo(); + CollectTelemetryParameters(); CollectToolingInfo(); if (driver_id == VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR) { From e3c153efa416d8bcac3b2801099dfba9da34392d Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Thu, 16 Sep 2021 00:54:24 -0400 Subject: [PATCH 2/2] vulkan_device: Reorder Float16Int8 declaration This variable was going out of scope before its usage in the vulkan device creation, causing a crash on very specific drivers. --- src/video_core/vulkan_common/vulkan_device.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 910e63a25..c2ec9f76a 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -368,8 +368,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR }; SetNext(next, demote); + VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8; if (is_int8_supported || is_float16_supported) { - VkPhysicalDeviceFloat16Int8FeaturesKHR float16_int8{ + float16_int8 = { .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR, .pNext = nullptr, .shaderFloat16 = is_float16_supported,