glDrawTransformFeedback() outputs only the first captured primitive

I would like to make a simple demo app using transform feedback. However when I try to render the captured results (points) it outputs only the first one (of the actual 16). The TF result is generated from a single vertex with a geometry shader. I render this result with another geometry shader which creates quads from points (I will be referring to this from now on).

[li]a query object verifies that the TF indeed captured 16 primitives (points)[/li][li]f I use glDrawArrays() instead, then the vertex shader receives and outputs all 16 vertices, but the geometry shader uses only the first (and outputs the same quad 16 times)[/li][li]the geometry shader is pretty simple, and it works fine, so I don’t think that’s the issue[/li][/ul]

Images from RenderDoc:


Relevant code:

What might cause this behavior?

Solved…apparently it is not a wise idea to put user-defined outputs/inputs into gl_PerVertex (or perhaps any) interface block. After rewriting the shaders like:

out int vs_particleType;
out vec3 vs_particlePosition;
out vec3 vs_particleVelocity;
out float vs_particleAge;
out uint vs_particleColor;

etc. the program works as expected.

It’s not a question of being a “wise idea”; it’s not allowed. Your shader should have failed to compiled; the specification is very clear on this. When you redeclare gl_PerVertex, you can only insert the members that are predefined.