Skip to content

Commit 3e04b40

Browse files
committed
Generate nonsemantic shader debug information
1 parent 9bd299b commit 3e04b40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libshaderc_util/src/compiler.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ std::tuple<bool, std::vector<uint32_t>, size_t> Compiler::Compile(
341341
options.generateDebugInfo = generate_debug_info_;
342342
options.disableOptimizer = true;
343343
options.optimizeSize = false;
344+
if (generate_debug_info_) {
345+
options.emitNonSemanticShaderDebugInfo = true;
346+
options.emitNonSemanticShaderDebugSource = true;
347+
}
344348
// Note the call to GlslangToSpv also populates compilation_output_data.
345349
glslang::GlslangToSpv(*program.getIntermediate(used_shader_stage), spirv,
346350
&options);

0 commit comments

Comments
 (0)