From c163c33664af1a68613ecbf0c4e747ad3ee3dbb1 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Tue, 20 Jun 2017 09:24:31 -0700 Subject: Fix types for `InputPatch` and `OutputPatch` Fixes #34. I'd declared these as if they were `InputPatch`, but they are really `InputPatch`. 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. --- source/slang/syntax.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source/slang/syntax.h') 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 -- cgit v1.2.3