st/mesa: set take_index_buffer_ownership to skip an atomic in u_threaded
authorMarek Olšák <marek.olsak@amd.com>
Sat, 2 Jan 2021 22:53:13 +0000 (17:53 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 27 Jan 2021 23:53:35 +0000 (23:53 +0000)
commit431cd34cdb18dd6804efeb48f1c08360acd58d98
treee84e3ea14f33d940846a33845dde52fa8db7fd39
parente6da78e4ccf00ecd97ae83e799c20242f92b4c1b
st/mesa: set take_index_buffer_ownership to skip an atomic in u_threaded

This reduces overhead by skipping the atomic, which is slow on AMD Zen.
It uses the same mechanism as vertex buffers.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
src/gallium/auxiliary/util/u_threaded_context.c
src/gallium/auxiliary/util/u_threaded_context.h
src/mesa/state_tracker/st_draw.c