mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 06:10:13 +01:00
nir/lower_subgroups: optimize reductions with cluster_size == 1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/218>
This commit is contained in:
parent
9ac3117e3e
commit
27734c52eb
1 changed files with 3 additions and 1 deletions
|
|
@ -821,8 +821,10 @@ lower_subgroups_instr(nir_builder *b, nir_instr *instr, void *_options)
|
|||
nir_intrinsic_set_cluster_size(intrin, 0);
|
||||
ret = NIR_LOWER_INSTR_PROGRESS;
|
||||
}
|
||||
if (nir_intrinsic_cluster_size(intrin) == 1)
|
||||
return intrin->src[0].ssa;
|
||||
if (options->lower_to_scalar && intrin->num_components > 1)
|
||||
ret = lower_subgroup_op_to_scalar(b, intrin);
|
||||
return lower_subgroup_op_to_scalar(b, intrin);
|
||||
return ret;
|
||||
}
|
||||
case nir_intrinsic_inclusive_scan:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue