nir/lower_goto_ifs: 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:33:00 +01:00 committed by Marge Bot
parent b5a90522e0
commit ff8c8858dc

View file

@ -346,7 +346,9 @@ loop_routing_start(struct routes *routing, nir_builder *b,
routing->brk.fork = fork;
routing->brk.reachable = fork_reachable(fork);
}
nir_push_loop(b);
nir_loop *loop = nir_push_loop(b);
nir_loop_add_continue_construct(loop);
}
/**
@ -978,5 +980,8 @@ nir_lower_goto_ifs(nir_shader *shader)
progress = true;
}
if (progress)
nir_lower_continue_constructs(shader);
return progress;
}