summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-link.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
-rw-r--r--source/slang/slang-ir-link.cpp9
1 files changed, 6 insertions, 3 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,