mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_loop().
This commit is contained in:
committed by
Alexandre Julliard
parent
3ca9656e84
commit
8485b2ee95
Notes:
Alexandre Julliard
2023-05-02 22:25:49 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/176
@@ -458,8 +458,8 @@ static bool attribute_list_has_duplicates(const struct parse_attribute_list *att
|
||||
static struct list *create_loop(struct hlsl_ctx *ctx, enum loop_type type, const struct parse_attribute_list *attributes, struct list *init, struct list *cond,
|
||||
struct list *iter, struct list *body, const struct vkd3d_shader_location *loc)
|
||||
{
|
||||
struct hlsl_ir_loop *loop = NULL;
|
||||
struct hlsl_block body_block;
|
||||
struct hlsl_ir_node *loop;
|
||||
unsigned int i;
|
||||
|
||||
if (attribute_list_has_duplicates(attributes))
|
||||
@@ -513,14 +513,13 @@ static struct list *create_loop(struct hlsl_ctx *ctx, enum loop_type type, const
|
||||
|
||||
if (!(loop = hlsl_new_loop(ctx, &body_block, loc)))
|
||||
goto oom;
|
||||
list_add_tail(init, &loop->node.entry);
|
||||
list_add_tail(init, &loop->entry);
|
||||
|
||||
vkd3d_free(cond);
|
||||
vkd3d_free(body);
|
||||
return init;
|
||||
|
||||
oom:
|
||||
vkd3d_free(loop);
|
||||
destroy_instr_list(init);
|
||||
destroy_instr_list(cond);
|
||||
destroy_instr_list(iter);
|
||||
|
||||
Reference in New Issue
Block a user