summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-emit-spirv.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-emit-spirv.cpp
parentd979b5048009c3909cfc13476a78a12ae5f4d61b (diff)
[SPIRV Debug] Properly update output arguments after call. (#3648)
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
-rw-r--r--source/slang/slang-emit-spirv.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp
index 64ef469ef..320263b25 100644
--- a/source/slang/slang-emit-spirv.cpp
+++ b/source/slang/slang-emit-spirv.cpp
@@ -4855,16 +4855,10 @@ struct SPIRVEmitContext
return nullptr;
IRBuilder builder(debugVar);
auto name = getName(debugVar);
- if (!name)
- {
- static uint32_t uid = 0;
- uid++;
- name = builder.getStringValue((String("unamed_local_var_") + String(uid)).getUnownedSlice());
- }
auto debugType = emitDebugType(debugVar->getDataType());
auto spvLocalVar = emitOpDebugLocalVariable(getSection(SpvLogicalSectionID::ConstantsAndTypes), debugVar, m_voidType, getNonSemanticDebugInfoExtInst(),
name, debugType, debugVar->getSource(), debugVar->getLine(), debugVar->getCol(), scope,
- builder.getIntValue(builder.getUIntType(), 0), nullptr);
+ builder.getIntValue(builder.getUIntType(), 0), debugVar->getArgIndex());
return spvLocalVar;
}