summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-stdlib.cpp
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/slang-stdlib.cpp
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/slang-stdlib.cpp')
-rw-r--r--source/slang/slang-stdlib.cpp4
1 files changed, 2 insertions, 2 deletions
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<T> __magic_type(HLSLConsumeStructuredBufferType) struct ConsumeStructu
out uint stride);
};
-__generic<T> __magic_type(HLSLInputPatchType) struct InputPatch
+__generic<T, let N : int> __magic_type(HLSLInputPatchType) struct InputPatch
{
__intrinsic __subscript(uint index) -> T;
};
-__generic<T> __magic_type(HLSLOutputPatchType) struct OutputPatch
+__generic<T, let N : int> __magic_type(HLSLOutputPatchType) struct OutputPatch
{
__intrinsic __subscript(uint index) -> T { set; }
};