diff options
| -rw-r--r-- | source/slang/slang-ir-link.cpp | 9 | ||||
| -rw-r--r-- | source/slang/slang-ir-specialize.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index a764db117..28bb63a87 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -873,6 +873,7 @@ static void maybeCopyLayoutInformationToParameters(IRFunc* func, IRBuilder* buil IRFunc* specializeIRForEntryPoint( IRSpecContext* context, + String const& mangledName, EntryPoint* entryPoint, UnownedStringSlice nameOverride) { @@ -886,7 +887,6 @@ IRFunc* specializeIRForEntryPoint( // not the same as the mangled name of the decl. // RefPtr<IRSpecSymbol> sym; - auto mangledName = entryPoint->getEntryPointMangledName(0); if (!context->getSymbols().tryGetValue(mangledName, sym)) { String hashedName = getHashedName(mangledName.getUnownedSlice()); @@ -1829,8 +1829,11 @@ LinkedIR linkIR(CodeGenContext* codeGenContext) auto entryPointMangledName = program->getEntryPointMangledName(entryPointIndex); auto nameOverride = program->getEntryPointNameOverride(entryPointIndex); auto entryPoint = program->getEntryPoint(entryPointIndex).get(); - irEntryPoints.add( - specializeIRForEntryPoint(context, entryPoint, nameOverride.getUnownedSlice())); + irEntryPoints.add(specializeIRForEntryPoint( + context, + entryPointMangledName, + entryPoint, + nameOverride.getUnownedSlice())); } // Layout information for global shader parameters is also required, diff --git a/source/slang/slang-ir-specialize.cpp b/source/slang/slang-ir-specialize.cpp index 81ad5ca2a..2757538a6 100644 --- a/source/slang/slang-ir-specialize.cpp +++ b/source/slang/slang-ir-specialize.cpp @@ -2979,7 +2979,7 @@ IRInst* specializeGenericImpl( builder->setInsertBefore(genericVal); List<IRInst*> pendingWorkList; - SLANG_DEFER(for (Index ii = pendingWorkList.getCount() - 1; ii >= 0; ii--) + SLANG_DEFER(for (Index ii = pendingWorkList.getCount() - 1; ii >= 0; ii--) if (context) context->addToWorkList(pendingWorkList[ii]);); // Now we will run through the body of the generic and |
