[Mesa-dev] [PATCH 3/5] glsl: Add gl_MESACurrentAttrib{Vert, Frag} internal builtin uniforms.

Eric Anholt eric at anholt.net
Tue Oct 11 11:31:09 PDT 2011


On Mon, 10 Oct 2011 11:23:29 -0700, Ian Romanick <idr at freedesktop.org> wrote:
> On 10/10/2011 11:06 AM, Eric Anholt wrote:
> > On Thu, 06 Oct 2011 14:40:28 -0700, Ian Romanick<idr at freedesktop.org>  wrote:
> >> On 10/06/2011 09:36 AM, Eric Anholt wrote:
> >>> These will be used by the FF VS/FS to represent the current attributes
> >>> when they don't have an active vertex array.
> >>
> >> I just want to make sure I grok this completely.  These are arrays of
> >> vec4 uniforms that are used when, for example, glColor is called outside
> >> glBegin.  Yes?
> >
> > Exactly.
> >
> >> If that's the case, what's the advantage of having it in the fragment
> >> shader (as opposed to using uniforms to interpolate the potentially
>                                 ^^^^^^^^
> That should have been "varyings."

Now it makes sense.

The reason for the code I'm retaining in this patch appears to be that
it removes a bunch of instructions in the fixed function vertex shaders.

I don't have data either way about whether this optimization is good.  I
do know that this optimization is a huge source of bugs and a sizeable
chunk of CPU overhead, but that's not enough justification for deletion
on its own, imo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111011/18214023/attachment.pgp>


More information about the mesa-dev mailing list