mesa: Keep track of the last looked-up VAO
authorFredrik Höglund <fredrik@kde.org>
Mon, 2 Mar 2015 17:25:45 +0000 (18:25 +0100)
committerFredrik Höglund <fredrik@kde.org>
Fri, 8 May 2015 13:31:02 +0000 (15:31 +0200)
commit6c37acfbedb88b460d2997f8b2d7b0e04a8782df
tree26ea46a6f300968164e5d52f39da95860c668579
parent2830c2fbeb9601c1760a9fffe45cd04f8c635d25
mesa: Keep track of the last looked-up VAO

This saves the cost of repeated hash table lookups when the same
vertex array object is referenced in a sequence of calls such as:

    glVertexArrayAttribFormat(vao, ...);
    glVertexArrayAttribBinding(vao, ...);
    glEnableVertexArrayAttrib(vao, ...);
    ...

Note that VAO's are container objects that are not shared between
contexts.

Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
src/mesa/main/arrayobj.c
src/mesa/main/mtypes.h