[Mesa-dev] explaining update_arrays

Ian Romanick idr at freedesktop.org
Wed Jun 22 10:57:07 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/22/2011 07:11 AM, Brian Paul wrote:
> On 06/22/2011 04:18 AM, Dave Airlie wrote:
>> I don't suppose anyone could contribute a comment on why somethings
>> check ctx->VertexProgram._Current,
>> and others check ctx->VertexProgram._Enabled
> 
> The former may point to a GLSL shader/program, a
> GL_NV/ARB_vertex_program program or a shader derived from fixed-function
> state.
> 
> The later will only be true when a GL_NV/ARB_vertex_program program is
> enabled and valid (GL_VERTEX_PROGRAM_ARB is enabled and the user's
> program compiled successfully).
> 
> I haven't looked at all the places where _Enabled or _Current is used,
> but there is a difference in what they mean.
> 
> 
>> By the looks of it the 0/POS attrib + the overlapping/16-31 ones check
>> _Current
>> and the others all check _Enabled, to me it would make some sense at
>> least if 0
>> was consistent with the others, but maybe someone knows what is correct.
> 
> The confusion probably goes all the way back to the ARB's unfortunate
> inability to reconcile NV's vs. ATI's different handling of generic
> vertex arrays.  NV used aliasing while ATI didn't so the ARB extension
> made it optional (a mess).  Plus, I think there was some minor
> difference in GL_ARB_vertex_program vs. GL_ARB_vertex_shaders w.r.t.
> generic vertex arrays.

In GLSL, only attribute 0 / glVertexArray alias.  The other non-generic
arrays can only be accessed via the named built-in variables (e.g.,
gl_Color).

> Do you suspect a bug here?
> 
> I'd have to go back and re-read all the specs to remember the details.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk4CLO8ACgkQX1gOwKyEAw+XiQCePgPOdtT6VC/M8wS7iy9zAdOG
mg0An3JeD0IMvXQEf456jx8CKNlx0bjF
=rXOl
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list