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

Author: Dave Airlie <[email protected]>
Date:   Mon Jul 18 09:18:48 2022 +1000

lavapipe: expose some subgroup extensions

These are part of vulkan 1.2, but expose them to be nice.

Acked-By: Mike Blumenkrantz <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17588>

---

 docs/features.txt                             | 4 ++--
 docs/relnotes/new_features.txt                | 1 +
 src/gallium/frontends/lavapipe/lvp_device.c   | 2 ++
 src/gallium/frontends/lavapipe/lvp_pipeline.c | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/features.txt b/docs/features.txt
index 97af0a7a123..f304a76b898 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -573,8 +573,8 @@ Khronos extensions that are not part of any Vulkan version:
   VK_EXT_shader_atomic_float2                           DONE (anv/gen9+, radv)
   VK_EXT_shader_image_atomic_int64                      DONE (radv)
   VK_EXT_shader_stencil_export                          DONE (anv/gen9+, lvp, 
radv, tu)
-  VK_EXT_shader_subgroup_ballot                         DONE (anv, radv)
-  VK_EXT_shader_subgroup_vote                           DONE (anv, radv)
+  VK_EXT_shader_subgroup_ballot                         DONE (anv, lvp, radv)
+  VK_EXT_shader_subgroup_vote                           DONE (anv, lvp, radv)
   VK_EXT_shader_module_identifier                       DONE (anv, radv, tu)
   VK_EXT_transform_feedback                             DONE (anv, lvp, radv, 
tu, vn)
   VK_EXT_vertex_attribute_divisor                       DONE (anv, radv, lvp, 
tu, v3dv)
diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt
index 81a9886476d..630fab7d001 100644
--- a/docs/relnotes/new_features.txt
+++ b/docs/relnotes/new_features.txt
@@ -11,3 +11,4 @@ VK_EXT_border_color_swizzle on lavapipe, ANV, turnip, RADV
 VK_EXT_shader_module_identifier on RADV
 variablePointers on lavapipe
 VK_EXT_multisampled_render_to_single_sampled on lavapipe
+VK_EXT_shader_subgroup_vote/ballot on lavapipe
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c 
b/src/gallium/frontends/lavapipe/lvp_device.c
index d460596d20b..854eb20fd65 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -169,6 +169,8 @@ static const struct vk_device_extension_table 
lvp_device_extensions_supported =
    .EXT_separate_stencil_usage            = true,
    .EXT_shader_demote_to_helper_invocation= true,
    .EXT_shader_stencil_export             = true,
+   .EXT_shader_subgroup_ballot            = true,
+   .EXT_shader_subgroup_vote              = true,
    .EXT_shader_viewport_index_layer       = true,
    .EXT_subgroup_size_control             = true,
    .EXT_texel_buffer_alignment            = true,
diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c 
b/src/gallium/frontends/lavapipe/lvp_pipeline.c
index aa3cf9400b7..4c4e410df11 100644
--- a/src/gallium/frontends/lavapipe/lvp_pipeline.c
+++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c
@@ -452,7 +452,7 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline,
 
    struct nir_lower_subgroups_options subgroup_opts = {0};
    subgroup_opts.lower_quad = true;
-   subgroup_opts.ballot_components = 4;
+   subgroup_opts.ballot_components = 1;
    subgroup_opts.ballot_bit_size = 32;
    NIR_PASS_V(nir, nir_lower_subgroups, &subgroup_opts);
 

Reply via email to