Mesa (main): zink: lower subgroup width to 1 for unsupported subgroup vote stages
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 31 15:01:11 UTC 2022
Module: Mesa
Branch: main
Commit: e1f46524e31997727258006ddbd1f8fdcec524eb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1f46524e31997727258006ddbd1f8fdcec524eb
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue May 31 09:02:06 2022 -0400
zink: lower subgroup width to 1 for unsupported subgroup vote stages
this should handle unsupported gfx subgroup vote
cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>
---
src/gallium/drivers/zink/zink_compiler.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c
index 43341070518..21923ed0190 100644
--- a/src/gallium/drivers/zink/zink_compiler.c
+++ b/src/gallium/drivers/zink/zink_compiler.c
@@ -2203,6 +2203,10 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir,
subgroup_options.ballot_bit_size = 32;
subgroup_options.ballot_components = 4;
subgroup_options.lower_subgroup_masks = true;
+ if (!(screen->info.subgroup.supportedStages & mesa_to_vk_shader_stage(nir->info.stage))) {
+ subgroup_options.subgroup_size = 1;
+ subgroup_options.lower_vote_trivial = true;
+ }
NIR_PASS_V(nir, nir_lower_subgroups, &subgroup_options);
}
More information about the mesa-commit
mailing list