From: Zebediah Figura zfigura@codeweavers.com
--- libs/vkd3d-shader/hlsl.y | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index cd4351a2..113c71ca 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -482,7 +482,8 @@ static bool attribute_list_has_duplicates(const struct parse_attribute_list *att return false; }
-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, +static struct hlsl_block *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 hlsl_block *body, const struct vkd3d_shader_location *loc) { struct hlsl_ir_node *loop; @@ -538,7 +539,7 @@ static struct list *create_loop(struct hlsl_ctx *ctx, enum loop_type type, const
vkd3d_free(cond); vkd3d_free(body); - return init; + return list_to_block(init);
oom: destroy_instr_list(init); @@ -4466,7 +4467,6 @@ static void validate_texture_format_type(struct hlsl_ctx *ctx, struct hlsl_type %type <list> jump_statement %type <list> logicand_expr %type <list> logicor_expr -%type <list> loop_statement %type <list> mul_expr %type <list> postfix_expr %type <list> primary_expr @@ -4494,6 +4494,7 @@ static void validate_texture_format_type(struct hlsl_ctx *ctx, struct hlsl_type %type <attr_list> attribute_list_optional
%type <block> compound_statement +%type <block> loop_statement %type <block> statement %type <block> statement_list
@@ -5784,9 +5785,6 @@ statement: $$ = list_to_block($1); } | loop_statement - { - $$ = list_to_block($1); - }
jump_statement: KW_RETURN expr ';'