summaryrefslogtreecommitdiffstats
path: root/source/slang/parameter-binding.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2019-04-16 07:46:02 -0700
committerTim Foley <tfoleyNV@users.noreply.github.com>2019-04-16 07:46:02 -0700
commita81efa750f093fdbfcf28c5d9bd619fca119bcde (patch)
tree2c23ef1416f377b1939e6e8fb33075d53a9b05b5 /source/slang/parameter-binding.cpp
parent7c82ead1f5a7f866abe4e8fa931f857a505c3077 (diff)
Add the missing case for `AssocTypeDecl` in varying parameters' layout generation. (#947)
Diffstat (limited to 'source/slang/parameter-binding.cpp')
-rw-r--r--source/slang/parameter-binding.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index caab5ce6e..293a24338 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -1736,6 +1736,12 @@ static RefPtr<TypeLayout> processEntryPointVaryingParameter(
genParamTypeLayout->findOrAddResourceInfo(LayoutResourceKind::GenericResource)->count += 1;
return genParamTypeLayout;
}
+ else if (auto associatedTypeParam = declRef.as<AssocTypeDecl>())
+ {
+ RefPtr<TypeLayout> assocTypeLayout = new TypeLayout();
+ assocTypeLayout->type = type;
+ return assocTypeLayout;
+ }
else
{
SLANG_UNEXPECTED("unhandled type kind");