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/debug_output.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/debug_output.c')
-rw-r--r-- | src/mesa/main/debug_output.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c index bc933db93d4..859e1f966d2 100644 --- a/src/mesa/main/debug_output.c +++ b/src/mesa/main/debug_output.c @@ -37,7 +37,7 @@ #include "util/simple_list.h" -static mtx_t DynamicIDMutex = _MTX_INITIALIZER_NP; +static simple_mtx_t DynamicIDMutex = _SIMPLE_MTX_INITIALIZER_NP; static GLuint NextDynamicID = 1; @@ -194,10 +194,10 @@ void _mesa_debug_get_id(GLuint *id) { if (!(*id)) { - mtx_lock(&DynamicIDMutex); + simple_mtx_lock(&DynamicIDMutex); if (!(*id)) *id = NextDynamicID++; - mtx_unlock(&DynamicIDMutex); + simple_mtx_unlock(&DynamicIDMutex); } } @@ -702,13 +702,13 @@ debug_pop_group(struct gl_debug_state *debug) static struct gl_debug_state * _mesa_lock_debug_state(struct gl_context *ctx) { - mtx_lock(&ctx->DebugMutex); + simple_mtx_lock(&ctx->DebugMutex); if (!ctx->Debug) { ctx->Debug = debug_create(); if (!ctx->Debug) { GET_CURRENT_CONTEXT(cur); - mtx_unlock(&ctx->DebugMutex); + simple_mtx_unlock(&ctx->DebugMutex); /* * This function may be called from other threads. When that is the @@ -727,7 +727,7 @@ _mesa_lock_debug_state(struct gl_context *ctx) static void _mesa_unlock_debug_state(struct gl_context *ctx) { - mtx_unlock(&ctx->DebugMutex); + simple_mtx_unlock(&ctx->DebugMutex); } /** @@ -1273,7 +1273,7 @@ _mesa_PopDebugGroup(void) void _mesa_init_debug_output(struct gl_context *ctx) { - mtx_init(&ctx->DebugMutex, mtx_plain); + simple_mtx_init(&ctx->DebugMutex, mtx_plain); if (MESA_DEBUG_FLAGS & DEBUG_CONTEXT) { /* If the MESA_DEBUG env is set to "context", we'll turn on the @@ -1301,7 +1301,7 @@ _mesa_free_errors_data(struct gl_context *ctx) ctx->Debug = NULL; } - mtx_destroy(&ctx->DebugMutex); + simple_mtx_destroy(&ctx->DebugMutex); } void GLAPIENTRY |