VulkanContext: Disable subgroup reduction on macOS with AMD GPUs

This commit is contained in:
OatmealDome 2021-09-16 23:22:05 -04:00
parent 2d1ec6332b
commit 7e8f5208fe
3 changed files with 10 additions and 1 deletions

View File

@ -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)

View File

@ -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<Bug, BugInfo> m_bugs;

View File

@ -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