summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/parameter-binding.cpp6
-rw-r--r--source/slang/type-layout.cpp7
2 files changed, 13 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");
diff --git a/source/slang/type-layout.cpp b/source/slang/type-layout.cpp
index ce767fc8b..90acf0d3c 100644
--- a/source/slang/type-layout.cpp
+++ b/source/slang/type-layout.cpp
@@ -2784,6 +2784,13 @@ static TypeLayoutResult _createTypeLayout(
return TypeLayoutResult(genParamTypeLayout, info);
}
+ else if (auto assocTypeParam = declRef.as<AssocTypeDecl>())
+ {
+ return createSimpleTypeLayout(
+ SimpleLayoutInfo(),
+ type,
+ rules);
+ }
else if( auto simpleGenericParam = declRef.as<GenericTypeParamDecl>() )
{
// A bare generic type parameter can come up during layout