[Mesa-dev] Mesa (master): r300g: fix gl_PointCoord
maraeo at gmail.com
Wed Aug 25 08:53:17 PDT 2010
On Wed, Aug 25, 2010 at 5:39 PM, Brian Paul <brianp at vmware.com> wrote:
> On 08/25/2010 09:09 AM, Luca Barbieri wrote:
>> The issue is in the Mesa state tracker.
>> In particular, it currently maps FRAG_ATTRIB_PNTC (used by GLSL
>> gl_PointCoord) to GENERIC unconditionally.
>> Hence, the "| 1" in the nvfx driver puts the sprite coordinate in
>> GENERIC if point_quad_rasterization is enabled.
>> This mapping by mesa/st is obviously incorrect since it overwrites
>> texcoord0 while it shouldn't (unless GL coord replace is also enabled
>> for it).
>> The mesa/st code actually includes several comments that state that
>> this is an hack.
>> mesa/st should be fixed to put FRAG_ATTRIB_PNTC in a GENERIC slot not
>> used by anything else, or in a different semantic.
> There really needs to be a new TGSI semantic label for this. The draw
> module needs some way to determine which fragment shader input expects PNTC.
> Care to write a patch?
Just out of curiosity, why should there be a new semantic label? Isn't the
sprite_coord_enable bitfield good enough for marking an existing fragment
shader GENERICn slot that expects sprite coords?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev