anv: Advertise VK_KHR_shader_subgroup_uniform_control_flow
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 23 Jun 2021 22:58:40 +0000 (15:58 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 25 Jun 2021 22:41:32 +0000 (22:41 +0000)
This is always valid for Intel, so we don't need to do anything
different if the Execution Mode is being used.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11476>

docs/relnotes/new_features.txt
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_pipeline.c

index b49ef0b..356ec55 100644 (file)
@@ -3,6 +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.
 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 0caf9da..abebfea 100644 (file)
@@ -248,6 +248,7 @@ get_device_extensions(const struct anv_physical_device *device,
       .KHR_shader_float_controls             = device->info.ver >= 8,
       .KHR_shader_non_semantic_info          = true,
       .KHR_shader_subgroup_extended_types    = device->info.ver >= 8,
+      .KHR_shader_subgroup_uniform_control_flow = true,
       .KHR_shader_terminate_invocation       = true,
       .KHR_spirv_1_4                         = true,
       .KHR_storage_buffer_storage_class      = true,
@@ -1718,6 +1719,13 @@ void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW_FEATURES_KHR: {
+         VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *features =
+            (VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR *)ext;
+         features->shaderSubgroupUniformControlFlow = true;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_TERMINATE_INVOCATION_FEATURES_KHR: {
          VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR *features =
             (VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR *)ext;
index 5f8b958..d9ac5f0 100644 (file)
@@ -165,6 +165,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
          .subgroup_basic = true,
          .subgroup_ballot = true,
          .subgroup_quad = true,
+         .subgroup_uniform_control_flow = true,
          .subgroup_shuffle = true,
          .subgroup_vote = true,
          .tessellation = true,