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] Test case
commit a889f9ee5cccee031c1090a6ef92cba894b1d77c Author: Kristian Høgsberg <krh@bitplanet.net> Date: Wed Nov 24 10:12:20 2010 -0500 i965: Don't write mrf assignment for pointsize output https://bugs.freedesktop.org/show_bug.cgi?id=31894
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.