mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Factor out hlsl_new_loop().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
ccd67dcf37
commit
0f4d62b09d
@@ -403,11 +403,9 @@ static struct list *create_loop(enum loop_type type, struct list *init, struct l
|
||||
if (init)
|
||||
list_move_head(list, init);
|
||||
|
||||
if (!(loop = vkd3d_calloc(1, sizeof(*loop))))
|
||||
if (!(loop = hlsl_new_loop(loc)))
|
||||
goto oom;
|
||||
init_node(&loop->node, HLSL_IR_LOOP, NULL, loc);
|
||||
list_add_tail(list, &loop->node.entry);
|
||||
list_init(&loop->body);
|
||||
|
||||
if (!append_conditional_break(cond))
|
||||
goto oom;
|
||||
|
||||
Reference in New Issue
Block a user