From ebfb9b9479a446c0ca36f2ec4b2bc84000e78477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 11 Feb 2026 11:14:31 +0100 Subject: [PATCH] tgsi_to_nir: Add and lower loop continue constructs We are going to disallow continue statements without loop continue constructs. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Georg Lehmann Reviewed-by: Faith Ekstrand Part-of: --- src/gallium/auxiliary/nir/tgsi_to_nir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c index df0eddd87d2..edc771ee8f2 100644 --- a/src/gallium/auxiliary/nir/tgsi_to_nir.c +++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c @@ -1995,7 +1995,7 @@ ttn_emit_instruction(struct ttn_compile *c) break; case TGSI_OPCODE_BGNLOOP: - nir_push_loop(&c->build); + nir_loop_add_continue_construct(nir_push_loop(&c->build)); break; case TGSI_OPCODE_BRK: @@ -2537,6 +2537,7 @@ ttn_finalize_nir(struct ttn_compile *c, struct pipe_screen *screen) MESA_TRACE_FUNC(); + NIR_PASS(_, nir, nir_lower_continue_constructs); NIR_PASS(_, nir, nir_lower_returns); NIR_PASS(_, nir, nir_lower_vars_to_ssa); NIR_PASS(_, nir, nir_lower_reg_intrinsics_to_ssa);