[Mesa-dev] [PATCH 3/5] glsl: Add gl_MESACurrentAttrib{Vert, Frag} internal builtin uniforms.
Eric Anholt
eric at anholt.net
Mon Oct 10 11:03:53 PDT 2011
On Thu, 06 Oct 2011 14:41:35 -0700, Ian Romanick <idr at freedesktop.org> wrote:
> On 10/06/2011 02:11 PM, Marek Olšák wrote:
> > If I get this right... Why not use a vertex array with stride == 0 instead?
>
> In the GL API, stride == 0 is a magic value that tells the GL
> implementation to figure out what the stride should be. As far as I
> know, most hardware can't do true zero-stride arrays.
The 965 is certainly fine with stride == 0. We use it. The 915 doesn't
because it requires fixed vertex layouts.
However, this patch is just retaining existing behavior of the FF code
for the conversion to GLSL IR. It removes huge numbers of instructions
in the shaders for fixed-function applications. Whether the complexity
and CPU overhead is worth that, I don't know. We certainly get tons of
bugs from this dodgy optimization.
-------------- 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/20111010/80cea7e7/attachment-0001.pgp>
More information about the mesa-dev
mailing list