mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
ir3/nir: Call nir_lower_subgroups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6752>
This commit is contained in:
parent
68b8b9e9e1
commit
8176657ead
1 changed files with 22 additions and 0 deletions
|
|
@ -486,6 +486,28 @@ ir3_nir_post_finalize(struct ir3_compiler *compiler, nir_shader *s)
|
|||
NIR_PASS_V(s, nir_lower_mediump_io, nir_var_shader_out, 0, false);
|
||||
}
|
||||
|
||||
if (s->info.stage == MESA_SHADER_COMPUTE) {
|
||||
bool progress = false;
|
||||
NIR_PASS(progress, s, nir_lower_subgroups, &(nir_lower_subgroups_options) {
|
||||
.subgroup_size = 128,
|
||||
.ballot_bit_size = 32,
|
||||
.ballot_components = 4,
|
||||
.lower_to_scalar = true,
|
||||
.lower_vote_eq = true,
|
||||
.lower_subgroup_masks = true,
|
||||
.lower_read_invocation_to_cond = true,
|
||||
});
|
||||
|
||||
progress = false;
|
||||
NIR_PASS(progress, s, ir3_nir_lower_subgroup_id_cs);
|
||||
|
||||
/* ir3_nir_lower_subgroup_id_cs creates extra compute intrinsics which
|
||||
* we need to lower again.
|
||||
*/
|
||||
if (progress)
|
||||
NIR_PASS_V(s, nir_lower_compute_system_values, NULL);
|
||||
}
|
||||
|
||||
/* we cannot ensure that ir3_finalize_nir() is only called once, so
|
||||
* we also need to do trig workarounds here:
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue