[Mesa-dev] Mesa (master): r300g: fix gl_PointCoord

Ian Romanick idr at freedesktop.org
Thu Aug 26 12:09:32 PDT 2010

Hash: SHA1

Marek Olšák wrote:
> On Thu, Aug 26, 2010 at 4:08 AM, Luca Barbieri <luca at luca-barbieri.com
> <mailto:luca at luca-barbieri.com>> wrote:
>     Also, doesn't sprite coord replacement also affect gl_TexCoord in GLSL?
> I suspect it does.

Why would it?  gl_TexCoord is a set of varyings written by the vertex
shader.  gl_PointCoord is a magic varying generated during
rasterization.  Neither has anything to do with the other in GLSL.  Like
all varyings (except the magic varyings gl_PointCoord and gl_FragCoord)
in points, the fragment shader gets the same value at every fragment.

I think there is a piglit test for this.  If it's not

Getting all the cases of fixed-function, assembly fragment programs, and
GLSL fragment shaders correct is hard.  I worked on this a bit for 965
and got really frustrated.  The fixed-function and assembly program
support (with the per-texture coordinate replacement bits) forces
state-based recompiles on most hardware.
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the mesa-dev mailing list