summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2017-04-21 13:48:38 +1000
committerTimothy Arceri <[email protected]>2017-04-22 10:01:15 +1000
commit0b2750620b65f9a5fd56ed857ddfef5fafec0894 (patch)
tree34fbc1e49c540c7ddddd554a1b9ccee5e878cc03 /src/mesa/main/arrayobj.c
parent622a68ed3e36a6b56db35df62c5913d2d54d5ed6 (diff)
mesa: Remove unnecessary locking from container objects.
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. V2: (Timothy Arceri) - rebased and dropped changes to framebuffer objects Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/main/arrayobj.c')
-rw-r--r--src/mesa/main/arrayobj.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index fdb3caad954..9f4477e45b3 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -169,7 +169,6 @@ _mesa_delete_vao(struct gl_context *ctx, struct gl_vertex_array_object *obj)
{
unbind_array_object_vbos(ctx, obj);
_mesa_reference_buffer_object(ctx, &obj->IndexBufferObj, NULL);
- mtx_destroy(&obj->Mutex);
free(obj->Label);
free(obj);
}
@@ -192,11 +191,9 @@ _mesa_reference_vao_(struct gl_context *ctx,
GLboolean deleteFlag = GL_FALSE;
struct gl_vertex_array_object *oldObj = *ptr;
- mtx_lock(&oldObj->Mutex);
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
- mtx_unlock(&oldObj->Mutex);
if (deleteFlag)
_mesa_delete_vao(ctx, oldObj);
@@ -207,12 +204,10 @@ _mesa_reference_vao_(struct gl_context *ctx,
if (vao) {
/* reference new array object */
- mtx_lock(&vao->Mutex);
assert(vao->RefCount > 0);
vao->RefCount++;
*ptr = vao;
- mtx_unlock(&vao->Mutex);
}
}
@@ -268,7 +263,6 @@ _mesa_initialize_vao(struct gl_context *ctx,
vao->Name = name;
- mtx_init(&vao->Mutex, mtx_plain);
vao->RefCount = 1;
/* Init the individual arrays */