mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Reuse the existing parser for scanning in compile_dxbc_tpf().
This commit is contained in:
parent
28774b3649
commit
507e8644ae
Notes:
Alexandre Julliard
2023-04-06 22:23:38 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/147
@ -1181,18 +1181,20 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
|
|||||||
scan_descriptor_info.next = scan_info.next;
|
scan_descriptor_info.next = scan_info.next;
|
||||||
scan_info.next = &scan_descriptor_info;
|
scan_info.next = &scan_descriptor_info;
|
||||||
|
|
||||||
if ((ret = scan_dxbc(&scan_info, message_context)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = vkd3d_shader_sm4_parser_create(compile_info, message_context, &parser)) < 0)
|
if ((ret = vkd3d_shader_sm4_parser_create(compile_info, message_context, &parser)) < 0)
|
||||||
{
|
{
|
||||||
WARN("Failed to initialise shader parser.\n");
|
WARN("Failed to initialise shader parser.\n");
|
||||||
vkd3d_shader_free_scan_descriptor_info(&scan_descriptor_info);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
vkd3d_shader_dump_shader(compile_info->source_type, parser->shader_version.type, &compile_info->source);
|
vkd3d_shader_dump_shader(compile_info->source_type, parser->shader_version.type, &compile_info->source);
|
||||||
|
|
||||||
|
if ((ret = scan_with_parser(&scan_info, message_context, parser)) < 0)
|
||||||
|
{
|
||||||
|
vkd3d_shader_parser_destroy(parser);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (compile_info->target_type == VKD3D_SHADER_TARGET_D3D_ASM)
|
if (compile_info->target_type == VKD3D_SHADER_TARGET_D3D_ASM)
|
||||||
{
|
{
|
||||||
vkd3d_shader_free_scan_descriptor_info(&scan_descriptor_info);
|
vkd3d_shader_free_scan_descriptor_info(&scan_descriptor_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user