mesa: Use atomics for shared VAO reference counts.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sat, 3 Feb 2018 14:22:33 +0000 (15:22 +0100)
committerMathias Fröhlich <mathias.froehlich@web.de>
Fri, 23 Feb 2018 04:34:11 +0000 (05:34 +0100)
commit2f351408467a1d2e46927b8df0d3047b67ae2623
tree4f3ba35429173ef3521bc7d2530a7ec9021ddc50
parent8a3a4b6fae75905088ce4fcb42fc50cb09763a10
mesa: Use atomics for shared VAO reference counts.

VAOs will be used in the next change as immutable object across multiple
contexts. Only reference counting may write concurrently on the VAO. So,
make the reference count thread safe for those and only those VAO objects.

v3: Use bool/true/false for gl_vertex_array_object::SharedAndImmutable.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/arrayobj.c
src/mesa/main/arrayobj.h
src/mesa/main/mtypes.h