Mesa (main): anv: Advertise VK_KHR_shader_subgroup_uniform_control_flow

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 25 23:15:25 UTC 2021


Module: Mesa
Branch: main
Commit: 5853f17c304d9f9acb2c4ad826f447d19405ec15
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5853f17c304d9f9acb2c4ad826f447d19405ec15

Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date:   Wed Jun 23 15:58:40 2021 -0700

anv: Advertise VK_KHR_shader_subgroup_uniform_control_flow

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 at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11476>

---

 docs/relnotes/new_features.txt  | 1 +
 src/intel/vulkan/anv_device.c   | 8 ++++++++
 src/intel/vulkan/anv_pipeline.c | 1 +
 3 files changed, 10 insertions(+)

diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index b49ef0be5f1..356ec5501a3 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -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.
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 0caf9dad361..abebfea01a8 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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;
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 5f8b9589b4c..d9ac5f09cb2 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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,



More information about the mesa-commit mailing list