On Thu, 29 Dec 2011 23:13:57 +0100, Mathias Froehlich <[email protected]> wrote: > +/** Returns the bitmask of all enabled arrays in fixed function mode. > + * > + * In fixed function mode only the traditional fixed function arrays > + * are available. > + */ > +static inline GLbitfield64 > +_mesa_array_object_get_enabled_ff(const struct gl_array_object *arrayObj) > +{ > + return arrayObj->_Enabled & VERT_BIT_FF_ALL; > +} > + > +/** Returns the bitmask of all enabled arrays in nv shader mode. > + * > + * In nv shader mode any the generic nv arrays superseed the traditional > + * fixed function arrays. The nv generic arrays take precedence > + * over the legacy arrays. > + */
Looks like the description is stated twice here. I'd just say "In NV
shader mode, The nv generic arrays take precedence over the legacy
arrays."
> +/** Returns the bitmask of all enabled arrays in arb/glsl shader mode.
> + *
> + * In arb/glsl shader mode all the fixed function and the arg/glsl generic
s/arg/arb/
> + * arrays are available. Here only the first generic array takes
> + * precedence over the legacy position array.
> + */
> +static inline GLbitfield64
> +_mesa_array_object_get_enabled_arb(const struct gl_array_object *arrayObj)
> +{
> + GLbitfield64 enabled = arrayObj->_Enabled;
> + return enabled & ~(VERT_BIT_POS & (enabled >> VERT_ATTRIB_GENERIC0));
> +}
> +#define VERT_BIT_FF_NVALIAS \
> + BITFIELD64_RANGE(VERT_ATTRIB_POS, VERT_ATTRIB_GENERIC_NV_MAX)
I had to read this one like 3 times to follow it. This range is
GENERIC0 to GENERIC_MAX shifted down to start from POS. I think I'd
prefer to see VERT_ATTRIB_TEX(VERT_ATTRIB_TEX_MAX) used to make it more
obvious what is aliased, and slightly future-proof for when
VERT_ATTRIB_GENERIC_MAX is increased.
pgpRiHnaxoZsQ.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
