diff options
| author | Yong He <yonghe@outlook.com> | 2024-10-24 21:31:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-24 21:31:34 -0700 |
| commit | a2a201e327559e6a24b081fee73096b2a3b3e33f (patch) | |
| tree | b0b5ca96db7e95d364779cc4ca84936a02962534 /source/slang/slang-ir.cpp | |
| parent | 46b8ab8353966f2590ed2667028b220b57f963ae (diff) | |
Use DebugDeclare instead of DebugValue. (#5404)
* Use DebugDeclare instead of DebugValue.
* Avoid generating illegal SPIRV.
* Improve DebugLine output.
* Fix.
* Fix.
* Misc improvements.
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 2fd090877..56e6e1676 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -3325,21 +3325,20 @@ namespace Slang if (argIndex) { IRInst* args[] = { source, line, col, argIndex }; - return emitIntrinsicInst(type, kIROp_DebugVar, 4, args); + return emitIntrinsicInst(getPtrType(type), kIROp_DebugVar, 4, args); } else { IRInst* args[] = { source, line, col }; - return emitIntrinsicInst(type, kIROp_DebugVar, 3, args); + return emitIntrinsicInst(getPtrType(type), kIROp_DebugVar, 3, args); } } - IRInst* IRBuilder::emitDebugValue(IRInst* debugVar, IRInst* debugValue, ArrayView<IRInst*> accessChain) + IRInst* IRBuilder::emitDebugValue(IRInst* debugVar, IRInst* debugValue) { List<IRInst*> args; args.add(debugVar); args.add(debugValue); - args.addRange(accessChain); return emitIntrinsicInst(getVoidType(), kIROp_DebugValue, (UInt)args.getCount(), args.getBuffer()); } |
