This is indeed a part of a geometry shader.
First part of the shader (ending with first EndPrimitive()
) is simplest possible pass-through geometry shader that does absolutely nothing to the geometry.
Second part is almost the same, except for the swizzling with the xy
. It duplicates geometry, but changing the x
and y
coordinates, so it effectively mirrors the image across the line that connects down-left and up-right corner of the screen.
So, geometry is being duplicated and mirrored across the diagonal of the screen.