nir/lower_subgroups: add option to only lower clustered rotates
On ir3, we have native support for full rotates but not for clustered ones. Signed-off-by: Job Noorman <jnoorman@igalia.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31731>
This commit is contained in:
@@ -6176,6 +6176,7 @@ typedef struct nir_lower_subgroups_options {
|
||||
bool lower_elect : 1;
|
||||
bool lower_read_invocation_to_cond : 1;
|
||||
bool lower_rotate_to_shuffle : 1;
|
||||
bool lower_rotate_clustered_to_shuffle : 1;
|
||||
bool lower_ballot_bit_count_to_mbcnt_amd : 1;
|
||||
bool lower_inverse_ballot : 1;
|
||||
bool lower_reduce : 1;
|
||||
|
||||
@@ -1323,6 +1323,10 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options)
|
||||
if (options->lower_rotate_to_shuffle &&
|
||||
(!options->lower_boolean_shuffle || intrin->src[0].ssa->bit_size != 1))
|
||||
return lower_to_shuffle(b, intrin, options);
|
||||
else if (options->lower_rotate_clustered_to_shuffle &&
|
||||
nir_intrinsic_cluster_size(intrin) > 0 &&
|
||||
(!options->lower_boolean_shuffle || intrin->src[0].ssa->bit_size != 1))
|
||||
return lower_to_shuffle(b, intrin, options);
|
||||
else if (options->lower_to_scalar && intrin->num_components > 1)
|
||||
return lower_subgroup_op_to_scalar(b, intrin);
|
||||
else if (options->lower_boolean_shuffle && intrin->src[0].ssa->bit_size == 1)
|
||||
|
||||
Reference in New Issue
Block a user