Community
cancel
Showing results for 
Search instead for 
Did you mean: 
amitlu
Beginner
138 Views

gl_PointCoord buggy?

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).
0 Kudos
7 Replies
amitlu
Beginner
138 Views

I sent the same test application to my friend and asked for a screenshot. He has a graphics hardware from another company and the screenshot he sent me back confirms my suspicion that this is an Intel bug.

I have attached two screenshots to this post. The one with the black quads show the erronous behavior on my Intel hardware. The other picture shows what it should really look like. I have also attached a glview report.
138 Views

Hi Amitlu,

Can you upload the test application you are using somewhere?

Is this the only test machine you have other than the one your friend tried for you?

Cheers,
-Ganesh
lvella
Beginner
138 Views

I am necroposting to inform you that this is still an issuae as of today. I wrote a small demonstration program that shows the problem. I get a full black window when running the program with an Intel video with the following software:
OpenGL renderer string: Mesa DRI Mobile Intel GM45 Express Chipset x86/MMX/SSE2
OpenGL version string: 2.1 Mesa 8.1-devel (git-897af1d oneiric-oibaf-ppa)
And I get the correct result (a bluish gradient colored ball) when running iton an ATI GPUover the following software:
OpenGL renderer string: Gallium 0.4 on AMD RV770
OpenGL version string: 2.1 Mesa 8.1-devel (git-7b64241)
Both screenshots and the source code of the demo program are bundled in the archive. See for yourself. I have also filed a bug report.
Deepak_V_Intel
Employee
138 Views

Hello,
Thanks for posting the application in the thread. We will try to replicate the issue and get back to you in case we run in to issues. Could you provide exact configuration of the system you were testing this on?
Thanks
-deepak
lvella
Beginner
138 Views

Thanks for looking into the problem.
I took all the info I could think of: lspci, /proc/cpuinfo and glxinfo. If you need some other specific info, please let me know. The distribution is Linux Mint 12 (pretty much Ubuntu 11.10), with bleeding edge video drivers (Mesa 8.1), but the issue is present in older drivers. The laptop model is eMachines E725.
lvella
Beginner
138 Views

So, is there any updates on this issue? Could you reproduce it? Is it platform specific, as I thought at first?
Jeff_G_
Beginner
138 Views

I'm having similar issues with point sprites and textures.  I can't get PointSize to work right, images are garbled or flipped upside down, depending on if I include a fragment shader.  Please help - I'm ripping my hair out as this works on a dozen other Intel/ATI/Nvida platforms I've tested it on.

http://communities.intel.com/message/179111#179111

Should I repost this discussion thread in this area? I'm not sure what the diff is between communities.intel.com and software.intel.com

Reply