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

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Mar 11 11:13:57 2022 -0500

lavapipe: EXT_subgroup_size_control

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15354>

---

 src/gallium/frontends/lavapipe/ci/lvp-fails.txt |  3 +++
 src/gallium/frontends/lavapipe/lvp_device.c     | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt 
b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt
index 6303d681a68..cb7e7b5ec69 100644
--- a/src/gallium/frontends/lavapipe/ci/lvp-fails.txt
+++ b/src/gallium/frontends/lavapipe/ci/lvp-fails.txt
@@ -3,6 +3,9 @@
 
dEQP-VK.rasterization.provoking_vertex.transform_feedback.first.line_strip_with_adjacency,Fail
 
dEQP-VK.rasterization.provoking_vertex.transform_feedback.per_pipeline.triangle_strip_with_adjacency,Fail
 
+# broken cts tests; fixes pending
+dEQP-VK.subgroups.size_control.compute.required_subgroup_size_min_require_full_subgroups,Fail
+
 #full list
 dEQP-VK.api.driver_properties.conformance_version,Fail
 
dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_4,Fail
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c 
b/src/gallium/frontends/lavapipe/lvp_device.c
index 3e426b1b2b1..221e3405b27 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -158,6 +158,7 @@ static const struct vk_device_extension_table 
lvp_device_extensions_supported =
    .EXT_shader_demote_to_helper_invocation= true,
    .EXT_shader_stencil_export             = true,
    .EXT_shader_viewport_index_layer       = true,
+   .EXT_subgroup_size_control             = true,
    .EXT_texel_buffer_alignment            = true,
    .EXT_transform_feedback                = true,
    .EXT_vertex_attribute_divisor          = true,
@@ -754,6 +755,15 @@ VKAPI_ATTR void VKAPI_CALL lvp_GetPhysicalDeviceFeatures2(
          features->maintenance4 = true;
          break;
       }
+
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES: {
+         VkPhysicalDeviceSubgroupSizeControlFeatures *features =
+            (VkPhysicalDeviceSubgroupSizeControlFeatures *)ext;
+         features->subgroupSizeControl = true;
+         features->computeFullSubgroups = true;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT: {
          VkPhysicalDeviceDepthClipControlFeaturesEXT *features =
             (VkPhysicalDeviceDepthClipControlFeaturesEXT *)ext;
@@ -1117,6 +1127,14 @@ VKAPI_ATTR void VKAPI_CALL 
lvp_GetPhysicalDeviceProperties2(
          properties->maxCustomBorderColorSamplers = 32 * 1024;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES: 
{
+         VkPhysicalDeviceSubgroupSizeControlProperties *props = 
(VkPhysicalDeviceSubgroupSizeControlProperties *)ext;
+         props->minSubgroupSize = lp_native_vector_width / 32;
+         props->maxSubgroupSize = lp_native_vector_width / 32;
+         props->maxComputeWorkgroupSubgroups = 32;
+         props->requiredSubgroupSizeStages = VK_SHADER_STAGE_FRAGMENT_BIT | 
VK_SHADER_STAGE_COMPUTE_BIT;
+         break;
+      }
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: {
          VkPhysicalDeviceProvokingVertexPropertiesEXT *properties =
             (VkPhysicalDeviceProvokingVertexPropertiesEXT*)ext;

Reply via email to