Mesa (master): lavapipe: enable subgroups features

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 7 20:18:46 UTC 2021


Module: Mesa
Branch: master
Commit: 34525bb088da43b3ec492ca0f439064ee077a167
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34525bb088da43b3ec492ca0f439064ee077a167

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Mar 19 12:05:01 2021 +1000

lavapipe: enable subgroups features

Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

---

 src/gallium/frontends/lavapipe/lvp_device.c   | 6 +++---
 src/gallium/frontends/lavapipe/lvp_pipeline.c | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c
index aeb0a371355..70d75ad3c89 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -770,9 +770,9 @@ lvp_get_physical_device_properties_1_1(struct lvp_physical_device *pdevice,
    p->deviceLUIDValid = false;
    p->deviceNodeMask = 0;
 
-   p->subgroupSize = 0;
-   p->subgroupSupportedStages = 0;
-   p->subgroupSupportedOperations = 0;
+   p->subgroupSize = 8;
+   p->subgroupSupportedStages = VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_COMPUTE_BIT;
+   p->subgroupSupportedOperations = VK_SUBGROUP_FEATURE_BASIC_BIT | VK_SUBGROUP_FEATURE_VOTE_BIT | VK_SUBGROUP_FEATURE_ARITHMETIC_BIT | VK_SUBGROUP_FEATURE_BALLOT_BIT;
    p->subgroupQuadOperationsInAllStages = false;
 
    p->pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES;
diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index 938b557046b..125133a33aa 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -472,6 +472,11 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
          .multiview = true,
          .physical_storage_buffer_address = true,
          .int64_atomics = true,
+         .subgroup_arithmetic = true,
+         .subgroup_basic = true,
+         .subgroup_ballot = true,
+         .subgroup_quad = true,
+         .subgroup_vote = true,
       },
       .ubo_addr_format = nir_address_format_32bit_index_offset,
       .ssbo_addr_format = nir_address_format_32bit_index_offset,



More information about the mesa-commit mailing list