r600: enable trivial ARB_shader_group_vote

This change was tested on rv770, palm and cayman.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34726>
This commit is contained in:
Patrick Lerda 2025-04-25 13:21:55 +02:00 committed by Marge Bot
parent 8a1ef5bd31
commit 7947fba185
3 changed files with 14 additions and 1 deletions

View file

@ -233,7 +233,7 @@ GL 4.6, GLSL 4.60 -- all DONE: radeonsi, virgl, zink, iris, crocus/gen7+, d3d12,
GL_ARB_polygon_offset_clamp DONE (freedreno, nv50, nvc0, r600, llvmpipe, v3d, panfrost, crocus)
GL_ARB_shader_atomic_counter_ops DONE (freedreno/a5xx+, nvc0, r600, llvmpipe, softpipe, v3d, panfrost)
GL_ARB_shader_draw_parameters DONE (freedreno/a6xx+, llvmpipe, nvc0, crocus/gen6+)
GL_ARB_shader_group_vote DONE (freedreno/a6xx, nvc0, llvmpipe, crocus)
GL_ARB_shader_group_vote DONE (freedreno/a6xx, nvc0, llvmpipe, crocus, r600)
GL_ARB_spirv_extensions DONE (freedreno, llvmpipe)
GL_ARB_texture_filter_anisotropic DONE (etnaviv/HALTI0, freedreno, nv50, nvc0, r600, softpipe, llvmpipe, v3d, panfrost/v6+, crocus)
GL_ARB_transform_feedback_overflow_query DONE (freedreno/a6xx+, nvc0, llvmpipe, softpipe, crocus/gen6+)

View file

@ -441,6 +441,7 @@ static void r600_init_screen_caps(struct r600_screen *rscreen)
caps->compute = rscreen->b.gfx_level > R700;
caps->tgsi_texcoord = true;
caps->shader_group_vote = true;
caps->nir_images_as_deref = false;
caps->fake_sw_msaa = false;

View file

@ -879,6 +879,18 @@ r600_finalize_nir_common(nir_shader *nir, enum amd_gfx_level gfx_level)
NIR_PASS(_, nir, r600_lower_shared_io);
NIR_PASS(_, nir, r600_nir_lower_atomics);
static const nir_lower_subgroups_options r600_nir_subgroups_options = {
.ballot_bit_size = 32,
.ballot_components = 1,
.lower_vote_trivial = true,
.lower_relative_shuffle = true,
.lower_quad_broadcast_dynamic = true,
.lower_elect = true,
.lower_inverse_ballot = true,
};
NIR_PASS(_, nir, nir_lower_subgroups, &r600_nir_subgroups_options);
if (gfx_level == CAYMAN)
NIR_PASS(_, nir, r600_legalize_image_load_store);