gl_PrimitiveID is zero when rendering points of size > 1
Submitted by den..@..und.de
Assigned to mes..@..op.org
Description
Using Mesa3d 12.1.0-devel with Ubuntu 16.04 LTS in VMware, I stumbled upon a bug regarding the contents of gl_PrimitiveID in the fragment shader. I am using gl_PrimitiveID for color generation. When rendering a VAO as GL_POINTS and the point size set by glPointSize() is larger than 1, gl_PrimitiveID constantly had a value of 0. As soon as the point size is reduced to 1 or the type on primitive is changed to GL_TRIANGLES, gl_PrimitiveID contains correct values. For rasterized points, the value of gl_PrimitiveID in the fragment shader should equal the value of a variable(declared using "flat") set to gl_VertexID in the vertex shader. Using this workaround i was able to produce the desired values.
Version: git