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);