Add test for the instance param (geometry shader)

This commit is contained in:
Gabriele Di Bari 2022-05-24 18:53:39 +02:00
parent e314891598
commit 353ef3ac3e
2 changed files with 19 additions and 1 deletions

17
Test/hlsl.instance.geom Normal file
View File

@ -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<VertexShaderOutput> output, uint id : SV_GSInstanceID)
{
[loop]
for (int i = 0; i < 3; ++i)
{
output.Append(input[i]);
}
output.RestartStrip();
}

View File

@ -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
);