GLES2 has a builtin GLSL output variable called gl_PointSize to set the size of points which replaces the glPointSize() function. However writing to these variable seems to cause Mesa to corrupt the output to other unrelated varyings. Cogl's generated GLES2 shader always writes to the gl_PointSize attribute but this breaks everything on Mesa and nothing is painted.
Attached is a test case which draws a rectangle in the top right and four points in the bottom left. All of the geometry should be red because a red color is passed from the vertex shader to the fragment shader via a varying variable. However writing to the gl_PointSize output causes the rectangle to become white. If you comment out the gl_PointSize line then the rectangle is red again.
Created attachment 40545 [details]
Author: Kristian Høgsberg <firstname.lastname@example.org>
Date: Wed Nov 24 10:12:20 2010 -0500
i965: Don't write mrf assignment for pointsize output