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. --- tests/bugs/gh-34.hlsl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/bugs/gh-34.hlsl (limited to 'tests') 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 input, inout TriangleStream outStream) +{ + VS_OUT output; + for (uint i = 0; i < 3; i += 1) + { + output = input[i]; + outStream.Append(output); + } + + outStream.RestartStrip(); +} -- cgit v1.2.3