mesa: optimize _mesa_attr_zero_aliases_vertex()
authorBrian Paul <brianp@vmware.com>
Fri, 18 Aug 2017 21:48:13 +0000 (15:48 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 22 Aug 2017 01:04:51 +0000 (19:04 -0600)
commit19e9bd4c117f9f38f4fdec0467a57f0e29e5c0f3
treef032bdb79bc1eba94540a7ec9efa32a2cf15a9c0
parent0ef5aa4128940f6d60f3442b1cfcbdb8f3614c8e
mesa: optimize _mesa_attr_zero_aliases_vertex()

After the context is initialized, the API and context flags won't
change.  So, we can compute whether vertex attribute 0 aliases
vertex position just once.

This should make the glVertexAttrib*() functions a little quicker.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/context.c
src/mesa/main/mtypes.h
src/mesa/main/varray.h