summaryrefslogtreecommitdiffstats
path: root/tests/bugs
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 /tests/bugs
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 'tests/bugs')
-rw-r--r--tests/bugs/gh-34.hlsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/bugs/gh-34.hlsl b/tests/bugs/gh-34.hlsl
new file mode 100644
index 000000000..feaddb2ab
--- /dev/null
+++ b/tests/bugs/gh-34.hlsl
@@ -0,0 +1,16 @@
+//TEST:COMPARE_HLSL: -profile gs_5_0 -target dxbc-assembly -no-checking
+
+struct VS_OUT { float3 p : POSITION; };
+
+[maxvertexcount(3)]
+void main(InputPatch<VS_OUT, 3> input, inout TriangleStream<VS_OUT> outStream)
+{
+ VS_OUT output;
+ for (uint i = 0; i < 3; i += 1)
+ {
+ output = input[i];
+ outStream.Append(output);
+ }
+
+ outStream.RestartStrip();
+}