summaryrefslogtreecommitdiff
path: root/source/slang/slang-syntax.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-syntax.cpp')
-rw-r--r--source/slang/slang-syntax.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/slang/slang-syntax.cpp b/source/slang/slang-syntax.cpp
index f3b590acf..80f57905f 100644
--- a/source/slang/slang-syntax.cpp
+++ b/source/slang/slang-syntax.cpp
@@ -1065,6 +1065,22 @@ Index getFilterCountImpl(const ReflectClassInfo& clsInfo, MemberFilterStyle filt
return as<IntVal>(findInnerMostGenericSubstitution(declRef.substitutions)->getArgs()[1]);
}
+ // MeshOutputType
+ // There's a subtle distinction between this and HLSLPatchType, the size
+ // here is the max possible size of the array, it's free to change at
+ // runtime. There's probably no circumstance where you'd want to be generic
+ // between the two, so we don't deduplicate this code.
+
+ Type* MeshOutputType::getElementType()
+ {
+ return as<Type>(findInnerMostGenericSubstitution(declRef.substitutions)->getArgs()[0]);
+ }
+
+ IntVal* MeshOutputType::getMaxElementCount()
+ {
+ return as<IntVal>(findInnerMostGenericSubstitution(declRef.substitutions)->getArgs()[1]);
+ }
+
// Constructors for types
ArrayExpressionType* getArrayType(