radv: enable VK_KHR_shader_subgroup_uniform_control_flow
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 21 Jun 2021 15:54:56 +0000 (16:54 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 1 Jul 2021 10:01:52 +0000 (10:01 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11626>

docs/features.txt
docs/relnotes/new_features.txt
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_shader.c

index f3004f6..460cdb8 100644 (file)
@@ -494,6 +494,7 @@ Khronos extensions that are not part of any Vulkan version:
   VK_KHR_push_descriptor                                DONE (anv, lvp, radv, tu)
   VK_KHR_shader_clock                                   DONE (anv, radv)
   VK_KHR_shader_non_semantic_info                       DONE (anv, radv)
+  VK_KHR_shader_subgroup_uniform_control_flow           DONE (anv, radv)
   VK_KHR_shader_terminate_invocation                    DONE (anv, radv, tu)
   VK_KHR_shared_presentable_image                       not started
   VK_KHR_surface                                        DONE (anv, lvp, radv, tu, v3dv, vn)
index 2ea846a..303fb23 100644 (file)
@@ -3,7 +3,7 @@ VK_EXT_provoking_vertex on RADV.
 VK_EXT_extended_dynamic_state2 on RADV.
 VK_EXT_global_priority_query on RADV.
 VK_EXT_physical_device_drm on RADV.
-VK_KHR_shader_subgroup_uniform_control_flow on Intel.
+VK_KHR_shader_subgroup_uniform_control_flow on Intel and RADV.
 32-bit x86 builds now default disable x87 math and use sse2.
 GL ES 3.1 on GT21x hardware.
 VK_EXT_acquire_drm_display on RADV.
index b5d799f..c1464c2 100644 (file)
@@ -434,6 +434,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
       .KHR_shader_float_controls = true,
       .KHR_shader_non_semantic_info = true,
       .KHR_shader_subgroup_extended_types = true,
+      .KHR_shader_subgroup_uniform_control_flow = true,
       .KHR_shader_terminate_invocation = true,
       .KHR_spirv_1_4 = true,
       .KHR_storage_buffer_storage_class = true,
@@ -1642,6 +1643,12 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
          features->descriptorBindingAccelerationStructureUpdateAfterBind = true;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: {
+         VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *features =
+            (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)ext;
+         features->shaderSubgroupUniformControlFlow = true;
+         break;
+      }
       default:
          break;
       }
index 5a1903b..2960008 100644 (file)
@@ -454,6 +454,7 @@ radv_shader_compile_to_nir(struct radv_device *device, struct vk_shader_module *
                .subgroup_basic = true,
                .subgroup_quad = true,
                .subgroup_shuffle = true,
+               .subgroup_uniform_control_flow = true,
                .subgroup_vote = true,
                .tessellation = true,
                .transform_feedback = true,