summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-type-layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-type-layout.cpp')
-rw-r--r--source/slang/slang-type-layout.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp
index 9dea0f167..5f2cf4ddf 100644
--- a/source/slang/slang-type-layout.cpp
+++ b/source/slang/slang-type-layout.cpp
@@ -2336,7 +2336,7 @@ static LayoutSize GetElementCount(IntVal* val)
return LayoutSize::infinite();
return LayoutSize(LayoutSize::RawValue(constantVal->getValue()));
}
- else if (const auto varRefVal = as<GenericParamIntVal>(val))
+ else if (const auto varRefVal = as<DeclRefIntVal>(val))
{
// TODO: We want to treat the case where the number of
// elements in an array depends on a generic parameter
@@ -2352,6 +2352,10 @@ static LayoutSize GetElementCount(IntVal* val)
{
return 0;
}
+ else if (as<FuncCallIntVal>(val))
+ {
+ return 0;
+ }
SLANG_UNEXPECTED("unhandled integer literal kind");
UNREACHABLE_RETURN(LayoutSize(0));
}