I'd like to texture point sprites in OpenGL using GLSL, but I'am unable to get it working. Since the following trivial fragment shader also doesn't work, I suspect a driver bug. I believe the following shader should output a gradient on each rendered sprite, but the sprites have just constant color.
----------------------------------
#version 120
uniform sampler2D Texture;
void main (void)
{
gl_FragColor = vec4(gl_PointCoord.st, 0.0, 1.0);
}
----------------------------------
The vertices are rendered using GL_POINTS, with all the following enabled:
glEnable(GL_POINT_SPRITE);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
gl_PointSize is written in the vertex shader, and the sprites show up using correct size, just gl_PointCoord seems to have an incorrect value.
For the exact hardware and software environment of my computer, see the attached dxdiag output. The problem also seems to exist under Linux (kernel 2.6.36.1 + xf86-video-intel 2.13.0 + mesa 7.9).



