summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-29 10:00:43 -0800
committerGitHub <noreply@github.com>2024-02-29 10:00:43 -0800
commit17da4d90dc9c3bb147667dbd86b45dcc3b1e725b (patch)
tree982690615c5227dbb6902deed1d618f3e5b55b82 /source/slang/slang-ir.cpp
parentd979b5048009c3909cfc13476a78a12ae5f4d61b (diff)
[SPIRV Debug] Properly update output arguments after call. (#3648)
Diffstat (limited to 'source/slang/slang-ir.cpp')
-rw-r--r--source/slang/slang-ir.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp
index 68b002153..ff9c6f6f8 100644
--- a/source/slang/slang-ir.cpp
+++ b/source/slang/slang-ir.cpp
@@ -3221,10 +3221,18 @@ namespace Slang
};
return emitIntrinsicInst(getVoidType(), kIROp_DebugLine, 5, args);
}
- IRInst* IRBuilder::emitDebugVar(IRType* type, IRInst* source, IRInst* line, IRInst* col)
+ IRInst* IRBuilder::emitDebugVar(IRType* type, IRInst* source, IRInst* line, IRInst* col, IRInst* argIndex)
{
- IRInst* args[] = { source, line, col };
- return emitIntrinsicInst(type, kIROp_DebugVar, 3, args);
+ if (argIndex)
+ {
+ IRInst* args[] = { source, line, col, argIndex };
+ return emitIntrinsicInst(type, kIROp_DebugVar, 4, args);
+ }
+ else
+ {
+ IRInst* args[] = { source, line, col };
+ return emitIntrinsicInst(type, kIROp_DebugVar, 3, args);
+ }
}
IRInst* IRBuilder::emitDebugValue(IRInst* debugVar, IRInst* debugValue, ArrayView<IRInst*> accessChain)