mesa: don't ever set NullBufferObj in gl_vertex_array_binding
authorMarek Olšák <marek.olsak@amd.com>
Sun, 22 Mar 2020 01:36:28 +0000 (21:36 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 6 Apr 2020 14:28:53 +0000 (10:28 -0400)
commite630271e0ec3eee7d921d76d3924873f6ee6b59b
tree28f71d8b21fbf1805325178c71233209920cdcd8
parenta0a0c68150b4dbba469c62159a327ae9465f6016
mesa: don't ever set NullBufferObj in gl_vertex_array_binding

This improves performance by 5% in the game "torcs", FPS: 98.83 -> 103.73

It does a lot of glPush/PopClientAttrib, which exacerbates the overhead
of setting NullBufferObj.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
src/mesa/drivers/dri/nouveau/nouveau_array.c
src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
src/mesa/main/api_arrayelt.c
src/mesa/main/arrayobj.c
src/mesa/main/bufferobj.c
src/mesa/main/draw.c
src/mesa/main/get.c
src/mesa/main/varray.c
src/mesa/tnl/t_split_copy.c
src/mesa/vbo/vbo_context.c
src/mesa/vbo/vbo_exec_api.c