From 7e8f5208fe2cd01277358abdeec622492927eb11 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Thu, 16 Sep 2021 23:22:05 -0400 Subject: [PATCH] VulkanContext: Disable subgroup reduction on macOS with AMD GPUs --- Source/Core/VideoBackends/Vulkan/VulkanContext.cpp | 3 ++- Source/Core/VideoCommon/DriverDetails.cpp | 2 ++ Source/Core/VideoCommon/DriverDetails.h | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index 63ad23e7ed..74d51c07df 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -944,7 +944,8 @@ void VulkanContext::PopulateShaderSubgroupSupport() VK_SUBGROUP_FEATURE_BALLOT_BIT; m_supports_shader_subgroup_operations = (subgroup_properties.supportedOperations & required_operations) == required_operations && - subgroup_properties.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT; + subgroup_properties.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT && + !DriverDetails::HasBug(DriverDetails::BUG_BROKEN_SUBGROUP_INVOCATION_ID); } bool VulkanContext::SupportsExclusiveFullscreen(const WindowSystemInfo& wsi, VkSurfaceKHR surface) diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index 3f31a522d0..4b1ce936d0 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -127,6 +127,8 @@ constexpr BugInfo m_known_bugs[] = { -1.0, -1.0, true}, {API_OPENGL, OS_WINDOWS, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN, BUG_BROKEN_SSBO_FIELD_ATOMICS, -1.0, -1.0, true}, + {API_VULKAN, OS_OSX, VENDOR_ATI, DRIVER_PORTABILITY, Family::UNKNOWN, + BUG_BROKEN_SUBGROUP_INVOCATION_ID, -1.0, -1.0, true}, }; static std::map m_bugs; diff --git a/Source/Core/VideoCommon/DriverDetails.h b/Source/Core/VideoCommon/DriverDetails.h index 600c9f3823..6a9927faa3 100644 --- a/Source/Core/VideoCommon/DriverDetails.h +++ b/Source/Core/VideoCommon/DriverDetails.h @@ -305,6 +305,12 @@ enum Bug // Started version: -1 // Ended version: -1 BUG_BROKEN_SSBO_FIELD_ATOMICS, + + // BUG: Accessing gl_SubgroupInvocationID causes the Metal shader compiler to crash. + // Affected devices: AMD (macOS) + // Started version: -1 + // Ended version: -1 + BUG_BROKEN_SUBGROUP_INVOCATION_ID, }; // Initializes our internal vendor, device family, and driver version