aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/queryobj.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-07 11:40:40 +1000
committerTimothy Arceri <[email protected]>2017-04-22 10:01:15 +1000
commit918cec8cbeeac58b8d9092d6fc4aacb8490eb50c (patch)
tree927c186256d0e754e0f9d714e56160a8a179d613 /src/mesa/main/queryobj.h
parentef6af0d5f7b59bd567c65a41165c321e43de6353 (diff)
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 <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/main/queryobj.h')
-rw-r--r--src/mesa/main/queryobj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index d1036fcce3d..24a82571db0 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -35,7 +35,7 @@ static inline struct gl_query_object *
_mesa_lookup_query_object(struct gl_context *ctx, GLuint id)
{
return (struct gl_query_object *)
- _mesa_HashLookup(ctx->Query.QueryObjects, id);
+ _mesa_HashLookupLocked(ctx->Query.QueryObjects, id);
}