mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Store the "instrs" field of struct hlsl_attribute as a hlsl_block.
This commit is contained in:
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
@ -2922,7 +2922,7 @@ void hlsl_free_attribute(struct hlsl_attribute *attr)
|
|||||||
|
|
||||||
for (i = 0; i < attr->args_count; ++i)
|
for (i = 0; i < attr->args_count; ++i)
|
||||||
hlsl_src_remove(&attr->args[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((void *)attr->name);
|
||||||
vkd3d_free(attr);
|
vkd3d_free(attr);
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,7 @@ struct hlsl_src
|
|||||||
struct hlsl_attribute
|
struct hlsl_attribute
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
struct list instrs;
|
struct hlsl_block instrs;
|
||||||
struct vkd3d_shader_location loc;
|
struct vkd3d_shader_location loc;
|
||||||
unsigned int args_count;
|
unsigned int args_count;
|
||||||
struct hlsl_src args[];
|
struct hlsl_src args[];
|
||||||
|
@ -5001,7 +5001,7 @@ attribute:
|
|||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
$$->name = $2;
|
$$->name = $2;
|
||||||
list_init(&$$->instrs);
|
hlsl_block_init(&$$->instrs);
|
||||||
$$->loc = @$;
|
$$->loc = @$;
|
||||||
$$->args_count = 0;
|
$$->args_count = 0;
|
||||||
}
|
}
|
||||||
@ -5016,8 +5016,8 @@ attribute:
|
|||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
$$->name = $2;
|
$$->name = $2;
|
||||||
list_init(&$$->instrs);
|
hlsl_block_init(&$$->instrs);
|
||||||
list_move_tail(&$$->instrs, &$4.instrs->instrs);
|
hlsl_block_add_block(&$$->instrs, $4.instrs);
|
||||||
vkd3d_free($4.instrs);
|
vkd3d_free($4.instrs);
|
||||||
$$->loc = @$;
|
$$->loc = @$;
|
||||||
$$->args_count = $4.args_count;
|
$$->args_count = $4.args_count;
|
||||||
|
Loading…
Reference in New Issue
Block a user