diff options
author | Timothy Arceri <[email protected]> | 2017-10-16 11:59:31 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-11-09 12:07:48 +1100 |
commit | f0857fe87b6e8985cb1d0ec46c1a358c4cf37c29 (patch) | |
tree | 6af78cdb291120353e2741681c7799b5799104df /src/mesa/main/texobj.c | |
parent | f98a2768ca0609fb81a0ee8f30ac1e70269334c4 (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/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 1978898b8b9..71c6f813233 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -274,7 +274,7 @@ _mesa_initialize_texture_object( struct gl_context *ctx, memset(obj, 0, sizeof(*obj)); /* init the non-zero fields */ - mtx_init(&obj->Mutex, mtx_plain); + simple_mtx_init(&obj->Mutex, mtx_plain); obj->RefCount = 1; obj->Name = name; obj->Target = target; @@ -411,7 +411,7 @@ _mesa_delete_texture_object(struct gl_context *ctx, _mesa_reference_buffer_object(ctx, &texObj->BufferObject, NULL); /* destroy the mutex -- it may have allocated memory (eg on bsd) */ - mtx_destroy(&texObj->Mutex); + simple_mtx_destroy(&texObj->Mutex); free(texObj->Label); @@ -554,12 +554,12 @@ _mesa_reference_texobj_(struct gl_texture_object **ptr, assert(valid_texture_object(oldTex)); (void) valid_texture_object; /* silence warning in release builds */ - mtx_lock(&oldTex->Mutex); + simple_mtx_lock(&oldTex->Mutex); assert(oldTex->RefCount > 0); oldTex->RefCount--; deleteFlag = (oldTex->RefCount == 0); - mtx_unlock(&oldTex->Mutex); + simple_mtx_unlock(&oldTex->Mutex); if (deleteFlag) { /* Passing in the context drastically changes the driver code for @@ -579,12 +579,12 @@ _mesa_reference_texobj_(struct gl_texture_object **ptr, if (tex) { /* reference new texture */ assert(valid_texture_object(tex)); - mtx_lock(&tex->Mutex); + simple_mtx_lock(&tex->Mutex); assert(tex->RefCount > 0); tex->RefCount++; *ptr = tex; - mtx_unlock(&tex->Mutex); + simple_mtx_unlock(&tex->Mutex); } } @@ -1615,10 +1615,10 @@ bind_texture_object(struct gl_context *ctx, unsigned unit, */ if (targetIndex != TEXTURE_EXTERNAL_INDEX) { bool early_out; - mtx_lock(&ctx->Shared->Mutex); + simple_mtx_lock(&ctx->Shared->Mutex); early_out = ((ctx->Shared->RefCount == 1) && (texObj == texUnit->CurrentTex[targetIndex])); - mtx_unlock(&ctx->Shared->Mutex); + simple_mtx_unlock(&ctx->Shared->Mutex); if (early_out) { return; } |