diff --git a/Test/hlsl.instance.geom b/Test/hlsl.instance.geom new file mode 100644 index 00000000..5295f389 --- /dev/null +++ b/Test/hlsl.instance.geom @@ -0,0 +1,17 @@ +struct VertexShaderOutput +{ + float4 m_position : SV_POSITION; + float4 m_color : COLOR0; +}; + +[maxvertexcount(3)] +[instance(5)] +void GeometryShader(triangle VertexShaderOutput input[3], inout TriangleStream output, uint id : SV_GSInstanceID) +{ + [loop] + for (int i = 0; i < 3; ++i) + { + output.Append(input[i]); + } + output.RestartStrip(); +} \ No newline at end of file diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp index 519be254..d3e38bb7 100644 --- a/gtests/Hlsl.FromFile.cpp +++ b/gtests/Hlsl.FromFile.cpp @@ -434,7 +434,8 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.typedef.frag", "PixelShaderFunction"}, {"hlsl.whileLoop.frag", "PixelShaderFunction"}, {"hlsl.void.frag", "PixelShaderFunction"}, - {"hlsl.type.type.conversion.all.frag", "main"} + {"hlsl.type.type.conversion.all.frag", "main"}, + {"hlsl.instance.geom", "GeometryShader"} }), FileNameAsCustomTestSuffix );