mesa: extend _mesa_bind_vertex_buffer to take ownership of the buffer reference
authorMarek Olšák <marek.olsak@amd.com>
Sun, 22 Mar 2020 22:13:45 +0000 (18:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 11:56:06 +0000 (11:56 +0000)
commit03ba57c6c53214b19aa0fdb66c680f2cadc3bbd9
tree610dac9af4d21e80675d59406bcf0b068581e985
parente9afe045cf5382993da7d31c0bf340def7b97107
mesa: extend _mesa_bind_vertex_buffer to take ownership of the buffer reference

This reduces overhead of _mesa_reference_buffer_object_ from 6% to 4%
with glthread when profiling the game "torcs" with non-VBO data uploaded
by glthread.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>
src/mesa/drivers/common/meta.c
src/mesa/main/bufferobj.c
src/mesa/main/varray.c
src/mesa/main/varray.h
src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_save_api.c