This doesn’t happen under Warp or on an older Win7 + GTX970 system, but it does happen on Win10 + RTX2080 + 417.35 driver.
I have a vertex shader that, to clip undesired vertices, sets their z position to -1 and returns an otherwise zeroe’d output struct. Then the geometry shader that follows checks if one of the input vertices has a z of -1 and, if so, doesn’t emit any geometry. However, what I exactly do in the vertex/geometry shaders isn’t important, it’s only the structure of the vertex shader that matters.
This works fine:
GS_FILLED_IN VSFilled(VS_FILLED_IN Input)
{
GS_FILLED_IN Output;
if (!all(Input.FilterMask & FilterMask)) //Discard vertices with incorrect filter mask
{
Output = (GS_FILLED_IN)0;
Output.Pos.z = -1;
}
else
{
...
}
return Output;
}
This results in graphics glitches - garbage triangles output by the geometry shader:
GS_FILLED_IN VSFilled(VS_FILLED_IN Input)
{
GS_FILLED_IN Output;
if (!all(Input.FilterMask & FilterMask)) //Discard vertices with incorrect filter mask
{
Output = (GS_FILLED_IN)0;
Output.Pos.z = -1;
[b]return Output;[/b]
}
else
{
...
}
return Output;
}
This issue is reproducible in an nsight dump I made, I can send it on request.