From 68dbcdd935ca53cddb714d2ab516a2880eef0bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Fri, 20 Dec 2024 12:42:02 -0600 Subject: [PATCH] ac/nir/ngg: Move wait attr ring workaround for GS to better place. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The call depends on the phis created by create_output_phis so the code becomes more readable if we move it closer to that. Signed-off-by: Timur Kristóf Acked-by: Marek Olšák Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/common/ac_nir_lower_ngg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_nir_lower_ngg.c b/src/amd/common/ac_nir_lower_ngg.c index 34a949ed912..5207d9566c9 100644 --- a/src/amd/common/ac_nir_lower_ngg.c +++ b/src/amd/common/ac_nir_lower_ngg.c @@ -3262,6 +3262,9 @@ ngg_gs_export_vertices(nir_builder *b, nir_def *max_num_out_vtx, nir_def *tid_in b->shader->info.outputs_written, b->shader->info.outputs_written_16bit, &s->out, tid_in_tg, max_num_out_vtx); + + if (wait_attr_ring) + export_pos0_wait_attr_ring(b, if_vtx_export_thread, s->out.outputs, s->options); } else { b->cursor = nir_after_cf_list(&if_vtx_export_thread->then_list); ac_nir_export_parameters(b, s->options->vs_output_param_offset, @@ -3270,9 +3273,6 @@ ngg_gs_export_vertices(nir_builder *b, nir_def *max_num_out_vtx, nir_def *tid_in &s->out); } } - - if (wait_attr_ring) - export_pos0_wait_attr_ring(b, if_vtx_export_thread, s->out.outputs, s->options); } static void