diff options
Diffstat (limited to 'source/slang/slang-ir-link.cpp')
| -rw-r--r-- | source/slang/slang-ir-link.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/slang/slang-ir-link.cpp b/source/slang/slang-ir-link.cpp index 704917629..9de2b5d1c 100644 --- a/source/slang/slang-ir-link.cpp +++ b/source/slang/slang-ir-link.cpp @@ -1346,7 +1346,6 @@ struct IRSpecializationState } }; -// TODO(DG): Generalize to multiple entry points LinkedIR linkIR( BackEndCompileRequest* compileRequest, const List<Int>& entryPointIndices, @@ -1448,12 +1447,13 @@ LinkedIR linkIR( // arguments which might end up affecting the mangled // entry point name. // - // TODO(DG): spot to generalize to multiple entry points - // Note that only stuff referenced by an entry point gets linked here - // Temporary assertion for checkpoint - SLANG_ASSERT(entryPointIndices.getCount() == 1); - auto entryPointMangledName = program->getEntryPointMangledName(entryPointIndices[0]); - auto irEntryPoint = specializeIRForEntryPoint(context, entryPointMangledName); + + List<IRFunc*> irEntryPoints; + for (auto entryPointIndex : entryPointIndices) + { + auto entryPointMangledName = program->getEntryPointMangledName(entryPointIndex); + irEntryPoints.add(specializeIRForEntryPoint(context, entryPointMangledName)); + } // Layout information for global shader parameters is also required, // and in particular every global parameter that is part of the layout @@ -1528,8 +1528,8 @@ LinkedIR linkIR( // LinkedIR linkedIR; linkedIR.module = state->irModule; - linkedIR.entryPoint = irEntryPoint; linkedIR.globalScopeVarLayout = irGlobalScopeVarLayout; + linkedIR.entryPoints = irEntryPoints; return linkedIR; } |
