Module: Mesa Branch: main Commit: 69454a8abd6726b8f82c02ef40896638d02e60e5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69454a8abd6726b8f82c02ef40896638d02e60e5
Author: Karol Herbst <kher...@redhat.com> Date: Mon Dec 11 20:44:40 2023 +0100 nak: move nir_lower_subgroups into nak_postprocess_nir Fixes a bunch of `dEQP-VK.descriptor_indexing` tests. Signed-off-by: Karol Herbst <kher...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26214> --- src/nouveau/compiler/nak_nir.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/nouveau/compiler/nak_nir.c b/src/nouveau/compiler/nak_nir.c index b00e6c24792..9da67d71ffc 100644 --- a/src/nouveau/compiler/nak_nir.c +++ b/src/nouveau/compiler/nak_nir.c @@ -323,20 +323,6 @@ nak_preprocess_nir(nir_shader *nir, const struct nak_compiler *nak) OPT(nir, nir_lower_system_values); OPT(nir, nak_nir_lower_subgroup_id); OPT(nir, nir_lower_compute_system_values, NULL); - - const nir_lower_subgroups_options subgroups_options = { - .subgroup_size = 32, - .ballot_bit_size = 32, - .ballot_components = 1, - .lower_to_scalar = true, - .lower_vote_eq = true, - .lower_first_invocation_to_ballot = true, - .lower_read_first_invocation = true, - .lower_elect = true, - .lower_inverse_ballot = true, - }; - OPT(nir, nir_lower_subgroups, &subgroups_options); - OPT(nir, nak_nir_lower_scan_reduce); } static uint16_t @@ -1123,6 +1109,20 @@ nak_postprocess_nir(nir_shader *nir, nak_optimize_nir(nir, nak); + const nir_lower_subgroups_options subgroups_options = { + .subgroup_size = 32, + .ballot_bit_size = 32, + .ballot_components = 1, + .lower_to_scalar = true, + .lower_vote_eq = true, + .lower_first_invocation_to_ballot = true, + .lower_read_first_invocation = true, + .lower_elect = true, + .lower_inverse_ballot = true, + }; + OPT(nir, nir_lower_subgroups, &subgroups_options); + OPT(nir, nak_nir_lower_scan_reduce); + if (nir_shader_has_local_variables(nir)) { OPT(nir, nir_lower_vars_to_explicit_types, nir_var_function_temp, glsl_get_natural_size_align_bytes);