Shader sometimes reads wrong index in VBO

I’m using a geometry shader to inflate points into quads. My vertex buffer object contains six floats for each vertex: two for position, two for size, one for rotation and one to specify which layer from a texture array to get the texture from. Sometimes my vertex shader sees the wrong value for the layer - it pulls in a value from a different vertex in the array. Specifically, it pulls in the value from the same field for the vertex with an index 80 smaller. Most of the time it works fine, it just glitches in some frames. I’m not changing the data in the VBO at all between frames. Am I doing something wrong, or is this a bug? What can I do to further diagnose the problem?

I’m using a GeForce 9300M GS with driver version 313.30 on Linux-x86_64. I tried the program on a Windows machine with (I think) 314 and a much newer video card and it didn’t glitch at all.



I’ve already asked about my problem on Stack Overflow, but have so far no one has been able to help. I have a slightly fuller description of the test program there along with some screenshots too: