mesa: don't lock hashtables that are not shared across contexts
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 7 Apr 2017 01:40:40 +0000 (11:40 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Sat, 22 Apr 2017 00:01:15 +0000 (10:01 +1000)
commit918cec8cbeeac58b8d9092d6fc4aacb8490eb50c
tree927c186256d0e754e0f9d714e56160a8a179d613
parentef6af0d5f7b59bd567c65a41165c321e43de6353
mesa: don't lock hashtables that are not shared across contexts

From Chapter 5 'Shared Objects and Multiple Contexts' of
the OpenGL 4.5 spec:

   "Objects which contain references to other objects include
   framebuffer, program pipeline, query, transform feedback,
   and vertex array objects.   Such objects are called container
   objects and are not shared"

For we leave locking in place for framebuffer objects because
the EXT fbo extension allowed sharing.

We could maybe just replace the hash with an ordinary hash table
but for now this should remove most of the unnecessary locking.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/mesa/main/arrayobj.c
src/mesa/main/pipelineobj.c
src/mesa/main/queryobj.c
src/mesa/main/queryobj.h
src/mesa/main/transformfeedback.c