vkd3d-shader/spirv: Pass a parser pointer to spirv_compiler_generate_spirv().

This commit is contained in:
Conor McCarthy
2023-01-20 12:58:57 +10:00
committed by Alexandre Julliard
parent 2a5ae0a8c6
commit d14f42be9d
Notes: Alexandre Julliard 2023-01-24 22:28:11 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/60
3 changed files with 15 additions and 13 deletions

View File

@@ -1176,7 +1176,6 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
struct vkd3d_shader_compile_info scan_info;
struct spirv_compiler *spirv_compiler;
struct vkd3d_shader_parser *parser;
unsigned int i;
int ret;
scan_info = *compile_info;
@@ -1234,13 +1233,7 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
return VKD3D_ERROR;
}
for (i = 0; i < parser->instructions.count && ret >= 0; ++i)
{
ret = spirv_compiler_handle_instruction(spirv_compiler, &parser->instructions.elements[i]);
}
if (ret >= 0)
ret = spirv_compiler_generate_spirv(spirv_compiler, compile_info, out);
ret = spirv_compiler_generate_spirv(spirv_compiler, compile_info, parser, out);
spirv_compiler_destroy(spirv_compiler);
vkd3d_shader_parser_destroy(parser);