mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/spirv: Rename struct vkd3d_dxbc_compiler to struct spirv_compiler.
We would like to generate SPIR-V for input formats other than DXBC. The "vkd3d_" prefix is dropped, partly to make names shorter, and partly to help clarify what is an internal function. I prefer avoiding the vkd3d_* prefix on all internal functions, for these reasons. However, I'm open to restoring it.
This commit is contained in:
parent
58c7c4b806
commit
35b48a8b04
Notes:
Alexandre Julliard
2022-11-08 23:05:02 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/45
File diff suppressed because it is too large
Load Diff
@ -1158,7 +1158,7 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
|
||||
struct vkd3d_shader_scan_descriptor_info scan_descriptor_info;
|
||||
struct vkd3d_shader_instruction instruction;
|
||||
struct vkd3d_shader_compile_info scan_info;
|
||||
struct vkd3d_dxbc_compiler *spirv_compiler;
|
||||
struct spirv_compiler *spirv_compiler;
|
||||
struct vkd3d_shader_parser *parser;
|
||||
int ret;
|
||||
|
||||
@ -1208,7 +1208,7 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!(spirv_compiler = vkd3d_dxbc_compiler_create(&parser->shader_version, &parser->shader_desc,
|
||||
if (!(spirv_compiler = spirv_compiler_create(&parser->shader_version, &parser->shader_desc,
|
||||
compile_info, &scan_descriptor_info, message_context, &parser->location)))
|
||||
{
|
||||
ERR("Failed to create DXBC compiler.\n");
|
||||
@ -1228,7 +1228,7 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
|
||||
break;
|
||||
}
|
||||
|
||||
if ((ret = vkd3d_dxbc_compiler_handle_instruction(spirv_compiler, &instruction)) < 0)
|
||||
if ((ret = spirv_compiler_handle_instruction(spirv_compiler, &instruction)) < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1236,9 +1236,9 @@ static int compile_dxbc_tpf(const struct vkd3d_shader_compile_info *compile_info
|
||||
ret = VKD3D_ERROR_INVALID_SHADER;
|
||||
|
||||
if (ret >= 0)
|
||||
ret = vkd3d_dxbc_compiler_generate_spirv(spirv_compiler, compile_info, out);
|
||||
ret = spirv_compiler_generate_spirv(spirv_compiler, compile_info, out);
|
||||
|
||||
vkd3d_dxbc_compiler_destroy(spirv_compiler);
|
||||
spirv_compiler_destroy(spirv_compiler);
|
||||
vkd3d_shader_parser_destroy(parser);
|
||||
vkd3d_shader_free_scan_descriptor_info(&scan_descriptor_info);
|
||||
return ret;
|
||||
|
@ -1085,17 +1085,17 @@ int vkd3d_glsl_generator_generate(struct vkd3d_glsl_generator *generator,
|
||||
struct vkd3d_shader_parser *parser, struct vkd3d_shader_code *out);
|
||||
void vkd3d_glsl_generator_destroy(struct vkd3d_glsl_generator *generator);
|
||||
|
||||
struct vkd3d_dxbc_compiler;
|
||||
struct spirv_compiler;
|
||||
|
||||
struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader_version *shader_version,
|
||||
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_scan_descriptor_info *scan_descriptor_info,
|
||||
struct vkd3d_shader_message_context *message_context, const struct vkd3d_shader_location *location);
|
||||
int vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler,
|
||||
int spirv_compiler_handle_instruction(struct spirv_compiler *compiler,
|
||||
const struct vkd3d_shader_instruction *instruction);
|
||||
int vkd3d_dxbc_compiler_generate_spirv(struct vkd3d_dxbc_compiler *compiler,
|
||||
int spirv_compiler_generate_spirv(struct spirv_compiler *compiler,
|
||||
const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *spirv);
|
||||
void vkd3d_dxbc_compiler_destroy(struct vkd3d_dxbc_compiler *compiler);
|
||||
void spirv_compiler_destroy(struct spirv_compiler *compiler);
|
||||
|
||||
void vkd3d_compute_dxbc_checksum(const void *dxbc, size_t size, uint32_t checksum[4]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user