summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
authorjarcherNV <jarcher@nvidia.com>2025-06-06 14:30:06 -0700
committerGitHub <noreply@github.com>2025-06-06 14:30:06 -0700
commit0d16228ae22fa2e1a00e62dc099eea08da7717fe (patch)
tree067573914132892dc1336dcdea2c8b595f24f871 /source/slang/slang-emit-c-like.cpp
parent649d533727b31b28397ffb3a530e655ac3861547 (diff)
Add command line option for separate debug info (#7178)
* Add command line option for separate debug info Add command line arg -separate-debug-info which, if provided, produces both a .spv and a .dbg.spv file. The .dbg.spv file contains full debug info and the .spv file has all debug info stripped out. Also add a DebugBuildIdentifier instruction to store a unique hash in both the output files, so they can be more easily matched together. A matching API is provided to allow using the Slang API to retrieve a base and debug SPIRV as well as the debug build identifier string.
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 0534b64d4..0092d159a 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -3210,6 +3210,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst)
case kIROp_DebugNoScope:
case kIROp_DebugInlinedVariable:
case kIROp_DebugFunction:
+ case kIROp_DebugBuildIdentifier:
break;
case kIROp_Unmodified:
@@ -5214,6 +5215,7 @@ void CLikeSourceEmitter::ensureGlobalInst(
case kIROp_DebugSource:
case kIROp_DebugValue:
case kIROp_DebugInlinedVariable:
+ case kIROp_DebugBuildIdentifier:
return;
default:
break;