Heya!
I’m trying some basic StreamOut stuff for the first time:
Lines shader:
struct vsOutput
{
float4 PosO: POSITION;
float2 UV: TEXCOORD0;
};
vsOutput VS(
float4 PosO: POSITION,
float2 UV: TEXCOORD0,
uint InstanceID: SV_VertexID)
{
vsOutput Out;
Out.PosO = PosO;
Out.UV = UV;
return Out;
}
struct gsOutput
{
float4 PosO: SV_POSITION;
float2 TexCd : TEXCOORD0;
};
[maxvertexcount(2)](maxvertexcount(2))
void GS(point vsOutput input[1](1), inout LineStream<gsOutput> lines)
{
gsOutput output;
output.PosO = input[0](0).PosO;
output.TexCd = float2(0,0);
lines.Append(output);
output.PosO = input[0](0).PosO + float4(1, 1, 0, 0);
lines.Append(output);
lines.RestartStrip();
}
GeometryShader StreamOutGS = ConstructGSWithSO( CompileShader( gs_4_0, GS() ), "POSITION.xyzw;TEXCOORD0.xy", NULL,NULL,NULL,-1 );
technique11 MakeLines
{
pass PP2
{
SetVertexShader( CompileShader( vs_4_0, VS() ) );
SetGeometryShader( StreamOutGS );
}
}
As you can see Technique Valid is coming out false.
TTY Renderer reports “Invalid layout detected for slices:0”.
I presume there’s an issue with my gsOutput ?