From 17da4d90dc9c3bb147667dbd86b45dcc3b1e725b Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 29 Feb 2024 10:00:43 -0800 Subject: [SPIRV Debug] Properly update output arguments after call. (#3648) --- source/slang/slang-emit-spirv.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'source/slang/slang-emit-spirv.cpp') 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; } -- cgit v1.2.3