diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 2b630425..d50288c0 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -10368,17 +10368,16 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler, struct return VKD3D_OK; } -int spirv_compile(struct vkd3d_shader_parser *parser, +int spirv_compile(struct vsir_program *program, uint64_t config_flags, const struct vkd3d_shader_scan_descriptor_info1 *scan_descriptor_info, const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context) { - struct vsir_program *program = &parser->program; struct spirv_compiler *spirv_compiler; int ret; if (!(spirv_compiler = spirv_compiler_create(program, compile_info, - scan_descriptor_info, message_context, parser->config_flags))) + scan_descriptor_info, message_context, config_flags))) { ERR("Failed to create SPIR-V compiler.\n"); return VKD3D_ERROR; diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 0d3bf891..71c04bc1 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1563,6 +1563,7 @@ int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, { struct vkd3d_shader_scan_descriptor_info1 scan_descriptor_info; struct vsir_program *program = &parser->program; + uint64_t config_flags = parser->config_flags; struct vkd3d_shader_compile_info scan_info; int ret; @@ -1577,7 +1578,7 @@ int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, case VKD3D_SHADER_TARGET_GLSL: if ((ret = scan_with_parser(&scan_info, message_context, &scan_descriptor_info, parser)) < 0) return ret; - ret = glsl_compile(program, parser->config_flags, compile_info, out, message_context); + ret = glsl_compile(program, config_flags, compile_info, out, message_context); vkd3d_shader_free_scan_descriptor_info1(&scan_descriptor_info); break; @@ -1585,7 +1586,8 @@ int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, case VKD3D_SHADER_TARGET_SPIRV_TEXT: if ((ret = scan_with_parser(&scan_info, message_context, &scan_descriptor_info, parser)) < 0) return ret; - ret = spirv_compile(parser, &scan_descriptor_info, compile_info, out, message_context); + ret = spirv_compile(program, config_flags, &scan_descriptor_info, + compile_info, out, message_context); vkd3d_shader_free_scan_descriptor_info1(&scan_descriptor_info); break; diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index b0e52a33..79a69daf 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -1555,7 +1555,7 @@ int glsl_compile(struct vsir_program *program, uint64_t config_flags, #define SPIRV_MAX_SRC_COUNT 6 -int spirv_compile(struct vkd3d_shader_parser *parser, +int spirv_compile(struct vsir_program *program, uint64_t config_flags, const struct vkd3d_shader_scan_descriptor_info1 *scan_descriptor_info, const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, struct vkd3d_shader_message_context *message_context);