mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Initialise the instruction array in vkd3d_shader_parser_init().
This commit is contained in:
committed by
Alexandre Julliard
parent
a9aaa59df0
commit
e8cb90608d
Notes:
Alexandre Julliard
2023-01-24 22:28:12 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/60
@@ -427,9 +427,10 @@ void vkd3d_shader_dump_shader(enum vkd3d_shader_source_type source_type,
|
||||
shader_get_source_type_suffix(source_type), shader->code, shader->size);
|
||||
}
|
||||
|
||||
void vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser,
|
||||
bool vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser,
|
||||
struct vkd3d_shader_message_context *message_context, const char *source_name,
|
||||
const struct vkd3d_shader_version *version, const struct vkd3d_shader_parser_ops *ops)
|
||||
const struct vkd3d_shader_version *version, const struct vkd3d_shader_parser_ops *ops,
|
||||
unsigned int instruction_reserve)
|
||||
{
|
||||
parser->message_context = message_context;
|
||||
parser->location.source_name = source_name;
|
||||
@@ -437,6 +438,7 @@ void vkd3d_shader_parser_init(struct vkd3d_shader_parser *parser,
|
||||
parser->location.column = 0;
|
||||
parser->shader_version = *version;
|
||||
parser->ops = ops;
|
||||
return shader_instruction_array_init(&parser->instructions, instruction_reserve);
|
||||
}
|
||||
|
||||
void VKD3D_PRINTF_FUNC(3, 4) vkd3d_shader_parser_error(struct vkd3d_shader_parser *parser,
|
||||
|
||||
Reference in New Issue
Block a user