From 3e04b409b89b4891665b7c7eea52fb2f085b6add Mon Sep 17 00:00:00 2001 From: Timo Suoranta Date: Thu, 25 Jan 2024 12:51:48 +0200 Subject: [PATCH] Generate nonsemantic shader debug information --- libshaderc_util/src/compiler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc index e5f5d1055..f4f0fef5f 100644 --- a/libshaderc_util/src/compiler.cc +++ b/libshaderc_util/src/compiler.cc @@ -341,6 +341,10 @@ std::tuple, size_t> Compiler::Compile( options.generateDebugInfo = generate_debug_info_; options.disableOptimizer = true; options.optimizeSize = false; + if (generate_debug_info_) { + options.emitNonSemanticShaderDebugInfo = true; + options.emitNonSemanticShaderDebugSource = true; + } // Note the call to GlslangToSpv also populates compilation_output_data. glslang::GlslangToSpv(*program.getIntermediate(used_shader_stage), spirv, &options);