diff options
| author | Yong He <yonghe@outlook.com> | 2024-03-01 16:11:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-01 16:11:43 -0800 |
| commit | a4919e3e16d6958b70d665ed682aae910ecf1d4b (patch) | |
| tree | af18aea83887ba07247f1efed15b1703346a3df8 /source | |
| parent | 9a1e327387ffa8552ac2f0aee8836a0b10a5578f (diff) | |
Enable debug info for swizzledStore. (#3659)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-insert-debug-value-store.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/slang-ir-insert-debug-value-store.cpp b/source/slang/slang-ir-insert-debug-value-store.cpp index 6243e6c09..004598b5d 100644 --- a/source/slang/slang-ir-insert-debug-value-store.cpp +++ b/source/slang/slang-ir-insert-debug-value-store.cpp @@ -130,6 +130,18 @@ namespace Slang setDebugValue(debugVar, varInst, storeInst->getVal(), accessChain.getArrayView()); } } + else if (auto swizzledStore = as<IRSwizzledStore>(inst)) + { + List<IRInst*> accessChain; + auto varInst = getRootAddr(swizzledStore->getDest(), accessChain); + IRInst* debugVar = nullptr; + if (mapVarToDebugVar.tryGetValue(varInst, debugVar)) + { + builder.setInsertAfter(swizzledStore); + auto loadVal = builder.emitLoad(swizzledStore->getDest()); + setDebugValue(debugVar, varInst, loadVal, accessChain.getArrayView()); + } + } else if (auto callInst = as<IRCall>(inst)) { auto funcValue = getResolvedInstForDecorations(callInst->getCallee()); |
