mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/spirv: Move spirv_compiler_destroy() to avoid forward declarations.
This commit is contained in:
committed by
Alexandre Julliard
parent
70cfd58be6
commit
28774b3649
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
@@ -2310,7 +2310,25 @@ static const char *spirv_compiler_get_entry_point_name(const struct spirv_compil
|
|||||||
return info && info->entry_point ? info->entry_point : "main";
|
return info && info->entry_point ? info->entry_point : "main";
|
||||||
}
|
}
|
||||||
|
|
||||||
static void spirv_compiler_destroy(struct spirv_compiler *compiler);
|
static void spirv_compiler_destroy(struct spirv_compiler *compiler)
|
||||||
|
{
|
||||||
|
vkd3d_free(compiler->control_flow_info);
|
||||||
|
|
||||||
|
vkd3d_free(compiler->output_info);
|
||||||
|
|
||||||
|
vkd3d_free(compiler->push_constants);
|
||||||
|
vkd3d_free(compiler->descriptor_offset_ids);
|
||||||
|
|
||||||
|
vkd3d_spirv_builder_free(&compiler->spirv_builder);
|
||||||
|
|
||||||
|
rb_destroy(&compiler->symbol_table, vkd3d_symbol_free, NULL);
|
||||||
|
|
||||||
|
vkd3d_free(compiler->spec_constants);
|
||||||
|
|
||||||
|
vkd3d_string_buffer_cache_cleanup(&compiler->string_buffers);
|
||||||
|
|
||||||
|
vkd3d_free(compiler);
|
||||||
|
}
|
||||||
|
|
||||||
static struct spirv_compiler *spirv_compiler_create(const struct vkd3d_shader_version *shader_version,
|
static struct spirv_compiler *spirv_compiler_create(const struct vkd3d_shader_version *shader_version,
|
||||||
const struct vkd3d_shader_desc *shader_desc, const struct vkd3d_shader_compile_info *compile_info,
|
const struct vkd3d_shader_desc *shader_desc, const struct vkd3d_shader_compile_info *compile_info,
|
||||||
@@ -9938,23 +9956,3 @@ int spirv_compile(struct vkd3d_shader_parser *parser,
|
|||||||
spirv_compiler_destroy(spirv_compiler);
|
spirv_compiler_destroy(spirv_compiler);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void spirv_compiler_destroy(struct spirv_compiler *compiler)
|
|
||||||
{
|
|
||||||
vkd3d_free(compiler->control_flow_info);
|
|
||||||
|
|
||||||
vkd3d_free(compiler->output_info);
|
|
||||||
|
|
||||||
vkd3d_free(compiler->push_constants);
|
|
||||||
vkd3d_free(compiler->descriptor_offset_ids);
|
|
||||||
|
|
||||||
vkd3d_spirv_builder_free(&compiler->spirv_builder);
|
|
||||||
|
|
||||||
rb_destroy(&compiler->symbol_table, vkd3d_symbol_free, NULL);
|
|
||||||
|
|
||||||
vkd3d_free(compiler->spec_constants);
|
|
||||||
|
|
||||||
vkd3d_string_buffer_cache_cleanup(&compiler->string_buffers);
|
|
||||||
|
|
||||||
vkd3d_free(compiler);
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user