From 196c684ac19691b4589b7d5b056ca82a4129e62f Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 24 Mar 2023 21:42:43 +0100 Subject: Vulkan: Enable subgroupShuffle. It is used as workaround for the missing subgroupBroadcastDynamicId flag on SPIR-V < 1.5. --- Source/Core/VideoBackends/Vulkan/VulkanContext.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/Vulkan/VulkanContext.cpp') diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index 4834a69bb8..5b5f2ffaee 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -981,9 +981,11 @@ void VulkanContext::PopulateShaderSubgroupSupport() // We require basic ops (for gl_SubgroupInvocationID), ballot (for subgroupBallot, // subgroupBallotFindLSB), and arithmetic (for subgroupMin/subgroupMax). - constexpr VkSubgroupFeatureFlags required_operations = VK_SUBGROUP_FEATURE_BASIC_BIT | - VK_SUBGROUP_FEATURE_ARITHMETIC_BIT | - VK_SUBGROUP_FEATURE_BALLOT_BIT; + // Shuffle is enabled as a workaround until SPIR-V >= 1.5 is enabled with broadcast(uniform) + // support. + constexpr VkSubgroupFeatureFlags required_operations = + VK_SUBGROUP_FEATURE_BASIC_BIT | VK_SUBGROUP_FEATURE_ARITHMETIC_BIT | + VK_SUBGROUP_FEATURE_BALLOT_BIT | VK_SUBGROUP_FEATURE_SHUFFLE_BIT; m_supports_shader_subgroup_operations = (subgroup_properties.supportedOperations & required_operations) == required_operations && subgroup_properties.supportedStages & VK_SHADER_STAGE_FRAGMENT_BIT && -- cgit v1.2.3