summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/syncobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-10-16 11:59:31 +1100
committerTimothy Arceri <[email protected]>2017-11-09 12:07:48 +1100
commitf0857fe87b6e8985cb1d0ec46c1a358c4cf37c29 (patch)
tree6af78cdb291120353e2741681c7799b5799104df /src/mesa/main/syncobj.c
parentf98a2768ca0609fb81a0ee8f30ac1e70269334c4 (diff)
mesa: use simple mtx in core mesa
Results from x11perf -copywinwin10 on Eric's SKL: 4.33338% ± 0.905054% (n=40) Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Yogesh Marathe <[email protected]>
Diffstat (limited to 'src/mesa/main/syncobj.c')
-rw-r--r--src/mesa/main/syncobj.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 6a21309aadf..c38a5707ddb 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -177,7 +177,7 @@ struct gl_sync_object *
_mesa_get_and_ref_sync(struct gl_context *ctx, GLsync sync, bool incRefCount)
{
struct gl_sync_object *syncObj = (struct gl_sync_object *) sync;
- mtx_lock(&ctx->Shared->Mutex);
+ simple_mtx_lock(&ctx->Shared->Mutex);
if (syncObj != NULL
&& _mesa_set_search(ctx->Shared->SyncObjects, syncObj) != NULL
&& !syncObj->DeletePending) {
@@ -187,7 +187,7 @@ _mesa_get_and_ref_sync(struct gl_context *ctx, GLsync sync, bool incRefCount)
} else {
syncObj = NULL;
}
- mtx_unlock(&ctx->Shared->Mutex);
+ simple_mtx_unlock(&ctx->Shared->Mutex);
return syncObj;
}
@@ -198,17 +198,17 @@ _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj,
{
struct set_entry *entry;
- mtx_lock(&ctx->Shared->Mutex);
+ simple_mtx_lock(&ctx->Shared->Mutex);
syncObj->RefCount -= amount;
if (syncObj->RefCount == 0) {
entry = _mesa_set_search(ctx->Shared->SyncObjects, syncObj);
assert (entry != NULL);
_mesa_set_remove(ctx->Shared->SyncObjects, entry);
- mtx_unlock(&ctx->Shared->Mutex);
+ simple_mtx_unlock(&ctx->Shared->Mutex);
ctx->Driver.DeleteSyncObject(ctx, syncObj);
} else {
- mtx_unlock(&ctx->Shared->Mutex);
+ simple_mtx_unlock(&ctx->Shared->Mutex);
}
}
@@ -292,9 +292,9 @@ fence_sync(struct gl_context *ctx, GLenum condition, GLbitfield flags)
ctx->Driver.FenceSync(ctx, syncObj, condition, flags);
- mtx_lock(&ctx->Shared->Mutex);
+ simple_mtx_lock(&ctx->Shared->Mutex);
_mesa_set_add(ctx->Shared->SyncObjects, syncObj);
- mtx_unlock(&ctx->Shared->Mutex);
+ simple_mtx_unlock(&ctx->Shared->Mutex);
return (GLsync)syncObj;
}