summaryrefslogtreecommitdiffstats
path: root/source/slang/syntax.h
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-06-20 09:24:31 -0700
committerTim Foley <tfoley@nvidia.com>2017-06-20 09:35:51 -0700
commitc163c33664af1a68613ecbf0c4e747ad3ee3dbb1 (patch)
treeb53ae92e80a1e447d738129e2015f8803da6bea4 /source/slang/syntax.h
parent5b85b51686bafe969c4d1c75b59aa17bc014367a (diff)
Fix types for `InputPatch` and `OutputPatch`
Fixes #34. I'd declared these as if they were `InputPatch<T>`, but they are really `InputPatch<T,N>`. This change fixes the declarations, and makes these types no longer inherit from the contrived `BuiltinGenericType`. Instead they are more-or-less ordinary `DeclRefType`s using the same approach that `MatrixExpressionType` uses.
Diffstat (limited to 'source/slang/syntax.h')
-rw-r--r--source/slang/syntax.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index 56574d124..66eddc536 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -1044,8 +1044,15 @@ namespace Slang
class HLSLAppendStructuredBufferType : public BuiltinGenericType {};
class HLSLConsumeStructuredBufferType : public BuiltinGenericType {};
- class HLSLInputPatchType : public BuiltinGenericType {};
- class HLSLOutputPatchType : public BuiltinGenericType {};
+ class HLSLPatchType : public DeclRefType
+ {
+ public:
+ ExpressionType* getElementType();
+ IntVal* getElementCount();
+ };
+
+ class HLSLInputPatchType : public HLSLPatchType {};
+ class HLSLOutputPatchType : public HLSLPatchType {};
// HLSL geometry shader output stream types