mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
vtn: set nir_loop::do_while during spirv_to_nir()
Acked-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40349>
This commit is contained in:
parent
32436731a3
commit
42663165a2
1 changed files with 8 additions and 0 deletions
|
|
@ -1220,6 +1220,14 @@ vtn_emit_branch(struct vtn_builder *b, const struct vtn_block *block,
|
|||
struct vtn_construct *loop = block->parent->innermost_loop;
|
||||
vtn_assert(loop);
|
||||
vtn_emit_break_for_construct(b, block, loop);
|
||||
|
||||
/* If this is a conditional back-edge, flag this loop as do-while loop.
|
||||
* The same applies to single-block loops.
|
||||
*/
|
||||
if (block->parent->type == vtn_construct_type_continue ||
|
||||
vtn_is_single_block_loop(loop)) {
|
||||
loop->nloop->do_while = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue