tgsi_to_nir: Add and lower loop continue constructs

We are going to disallow continue statements without
loop continue constructs.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39942>
This commit is contained in:
Daniel Schürmann 2026-02-11 11:14:31 +01:00 committed by Marge Bot
parent 058d15fa11
commit ebfb9b9479

View file

@ -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);