OSDN Git Service

mesa: Avoid ABA problem on buffer object bind.
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>
Sat, 22 Oct 2011 10:57:01 +0000 (12:57 +0200)
committerBrian Paul <brianp@vmware.com>
Mon, 24 Oct 2011 14:37:19 +0000 (08:37 -0600)
commit9ed88983b03114d66d527354248e26f77d8868b9
tree87d2a36ceae8b8cc570ece7fef3b2802d83b6aa2
parentc9bb1bdc4859af001f0bc9a931eaf53266b49c0c
mesa: Avoid ABA problem on buffer object bind.

Make sure we do not run into the classic ABA problem on buffer object bind,
reusing this name and may be never rebind since we get an new name
that was just deleted and never rebound in between.
The explicit rebinding to the debault object in the current context
prevents the above in the current context, but another context
sharing the same objects might suffer from this problem.

Minor var renaming and comments edited by Brian.

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