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/slang-stdlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-stdlib.cpp') diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp index 9ff8a1078..19827285c 100644 --- a/source/slang/slang-stdlib.cpp +++ b/source/slang/slang-stdlib.cpp @@ -78,12 +78,12 @@ __generic __magic_type(HLSLConsumeStructuredBufferType) struct ConsumeStructu out uint stride); }; -__generic __magic_type(HLSLInputPatchType) struct InputPatch +__generic __magic_type(HLSLInputPatchType) struct InputPatch { __intrinsic __subscript(uint index) -> T; }; -__generic __magic_type(HLSLOutputPatchType) struct OutputPatch +__generic __magic_type(HLSLOutputPatchType) struct OutputPatch { __intrinsic __subscript(uint index) -> T { set; } }; -- cgit v1.2.3