gallivm: add subgroup lowering support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>
This commit is contained in:
Dave Airlie 2021-03-19 12:04:11 +10:00 committed by Marge Bot
parent 8dc398848a
commit bf6fd9a2eb
1 changed files with 9 additions and 0 deletions

View File

@ -2317,6 +2317,15 @@ void lp_build_opt_nir(struct nir_shader *nir)
nir_lower_tex_options options = { .lower_tex_without_implicit_lod = true };
NIR_PASS_V(nir, nir_lower_tex, &options);
const nir_lower_subgroups_options subgroups_options = {
.subgroup_size = lp_native_vector_width / 32,
.ballot_bit_size = 32,
.lower_to_scalar = true,
.lower_subgroup_masks = true,
};
NIR_PASS_V(nir, nir_lower_subgroups, &subgroups_options);
} while (progress);
nir_lower_bool_to_int32(nir);
}