From bdc096d437c6937002fcb70baaa9612946d1c84e Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 11 Mar 2024 15:23:57 +0100 Subject: [PATCH] vkd3d-shader/d3d-asm: Get rid of the (now) redundant "shader_desc" parameter to vkd3d_dxbc_binary_to_text(). And rename the function to d3d_asm_compile() while we're touching it. --- libs/vkd3d-shader/d3d_asm.c | 6 +++--- libs/vkd3d-shader/vkd3d_shader_main.c | 2 +- libs/vkd3d-shader/vkd3d_shader_private.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c index 7b30d260..fcbb321e 100644 --- a/libs/vkd3d-shader/d3d_asm.c +++ b/libs/vkd3d-shader/d3d_asm.c @@ -2222,8 +2222,8 @@ static enum vkd3d_result dump_signatures(struct vkd3d_d3d_asm_compiler *compiler return VKD3D_OK; } -enum vkd3d_result vkd3d_dxbc_binary_to_text(const struct vsir_program *program, - const struct vkd3d_shader_desc *shader_desc, const struct vkd3d_shader_compile_info *compile_info, +enum vkd3d_result d3d_asm_compile(const struct vsir_program *program, + const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, enum vsir_asm_flags flags) { const struct vkd3d_shader_version *shader_version = &program->shader_version; @@ -2357,7 +2357,7 @@ void vkd3d_shader_trace(const struct vsir_program *program) const char *p, *q, *end; struct vkd3d_shader_code code; - if (vkd3d_dxbc_binary_to_text(program, NULL, NULL, &code, VSIR_ASM_FLAG_DUMP_TYPES) != VKD3D_OK) + if (d3d_asm_compile(program, NULL, &code, VSIR_ASM_FLAG_DUMP_TYPES) != VKD3D_OK) return; end = (const char *)code.code + code.size; diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 59a98d1b..36aa5916 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1563,7 +1563,7 @@ static int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, switch (compile_info->target_type) { case VKD3D_SHADER_TARGET_D3D_ASM: - ret = vkd3d_dxbc_binary_to_text(program, &parser->shader_desc, compile_info, out, VSIR_ASM_FLAG_NONE); + ret = d3d_asm_compile(program, compile_info, out, VSIR_ASM_FLAG_NONE); break; case VKD3D_SHADER_TARGET_GLSL: diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 07b9f94c..02902900 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -1404,8 +1404,8 @@ enum vsir_asm_flags VSIR_ASM_FLAG_DUMP_TYPES = 0x1, }; -enum vkd3d_result vkd3d_dxbc_binary_to_text(const struct vsir_program *program, - const struct vkd3d_shader_desc *shader_desc, const struct vkd3d_shader_compile_info *compile_info, +enum vkd3d_result d3d_asm_compile(const struct vsir_program *program, + const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, enum vsir_asm_flags flags); void vkd3d_string_buffer_cleanup(struct vkd3d_string_buffer *buffer); struct vkd3d_string_buffer *vkd3d_string_buffer_get(struct vkd3d_string_buffer_cache *list);