vkd3d-shader/hlsl: Store the "instrs" field of struct hlsl_attribute as a hlsl_block.

This commit is contained in:
Zebediah Figura 2022-11-14 20:50:17 -06:00 committed by Alexandre Julliard
parent 372ddd1f29
commit 0652bb1950
Notes: Alexandre Julliard 2023-08-08 21:47:28 +09: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/290
3 changed files with 5 additions and 5 deletions

View File

@ -2922,7 +2922,7 @@ void hlsl_free_attribute(struct hlsl_attribute *attr)
for (i = 0; i < attr->args_count; ++i)
hlsl_src_remove(&attr->args[i]);
hlsl_free_instr_list(&attr->instrs);
hlsl_block_cleanup(&attr->instrs);
vkd3d_free((void *)attr->name);
vkd3d_free(attr);
}

View File

@ -337,7 +337,7 @@ struct hlsl_src
struct hlsl_attribute
{
const char *name;
struct list instrs;
struct hlsl_block instrs;
struct vkd3d_shader_location loc;
unsigned int args_count;
struct hlsl_src args[];

View File

@ -5001,7 +5001,7 @@ attribute:
YYABORT;
}
$$->name = $2;
list_init(&$$->instrs);
hlsl_block_init(&$$->instrs);
$$->loc = @$;
$$->args_count = 0;
}
@ -5016,8 +5016,8 @@ attribute:
YYABORT;
}
$$->name = $2;
list_init(&$$->instrs);
list_move_tail(&$$->instrs, &$4.instrs->instrs);
hlsl_block_init(&$$->instrs);
hlsl_block_add_block(&$$->instrs, $4.instrs);
vkd3d_free($4.instrs);
$$->loc = @$;
$$->args_count = $4.args_count;