nir/lower_subgroups: add generic scan/reduce lower

this is the lowering from NAK, fixed up for common code. the existing code is
used for boolean scan/reduce. I make no guarantee that this works for subgroup
sizes other than 32.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28993>
This commit is contained in:
Alyssa Rosenzweig
2024-05-06 22:31:53 -04:00
committed by Marge Bot
parent 8b070c36ec
commit b9a0c8dc6d
2 changed files with 171 additions and 2 deletions
+1
View File
@@ -5824,6 +5824,7 @@ typedef struct nir_lower_subgroups_options {
bool lower_rotate_to_shuffle : 1;
bool lower_ballot_bit_count_to_mbcnt_amd : 1;
bool lower_inverse_ballot : 1;
bool lower_reduce : 1;
bool lower_boolean_reduce : 1;
bool lower_boolean_shuffle : 1;
} nir_lower_subgroups_options;