From 1866447cf401106fe536e2f31bef36b5b4cbeb77 Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Wed, 18 Oct 2023 12:46:46 -0400 Subject: [PATCH] Initialize spv_options in glslang_program_SPIRV_generate This will prevent any recurrence of issues like the one addressed by PR #3364. --- SPIRV/CInterface/spirv_c_interface.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/SPIRV/CInterface/spirv_c_interface.cpp b/SPIRV/CInterface/spirv_c_interface.cpp index 5e7316e4fa..f421ea5a8e 100644 --- a/SPIRV/CInterface/spirv_c_interface.cpp +++ b/SPIRV/CInterface/spirv_c_interface.cpp @@ -83,16 +83,9 @@ static EShLanguage c_shader_stage(glslang_stage_t stage) GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, glslang_stage_t stage) { - glslang_spv_options_t spv_options; - spv_options.generate_debug_info = false; - spv_options.strip_debug_info = false; - spv_options.emit_nonsemantic_shader_debug_info = false; - spv_options.emit_nonsemantic_shader_debug_source = false; + glslang_spv_options_t spv_options {}; spv_options.disable_optimizer = true; - spv_options.optimize_size = false; - spv_options.disassemble = false; spv_options.validate = true; - spv_options.compile_only = false; glslang_program_SPIRV_generate_with_options(program, stage, &spv_options); }