summaryrefslogtreecommitdiffstats
path: root/source/slang/parameter-binding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/parameter-binding.cpp')
-rw-r--r--source/slang/parameter-binding.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index b8df39ade..3f5c01d09 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -2429,10 +2429,20 @@ static void collectEntryPointParameters(
entryPointLayout->entryPoint = entryPointFuncDecl;
context->entryPointLayout = entryPointLayout;
-
-
context->shared->programLayout->entryPoints.Add(entryPointLayout);
+ // Note: this isn't really the best place for this logic to sit,
+ // but it is the simplest place where we have a direct correspondance
+ // between a single `EntryPointRequest` and its matching `EntryPointLayout`,
+ // so we'll use it.
+ //
+ for( auto taggedUnionType : entryPoint->taggedUnionTypes )
+ {
+ auto substType = taggedUnionType->Substitute(typeSubst).As<Type>();
+ auto typeLayout = CreateTypeLayout(context->layoutContext, substType);
+ entryPointLayout->taggedUnionTypeLayouts.Add(typeLayout);
+ }
+
// Okay, we seemingly have an entry-point function, and now we need to collect info on its parameters too
//
// TODO: Long-term we probably want complete information on all inputs/outputs of an entry point,