summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.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/bufferobj.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/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index dfeea94bd19..c1dfdfba823 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -471,7 +471,7 @@ _mesa_delete_buffer_object(struct gl_context *ctx,
bufObj->RefCount = -1000;
bufObj->Name = ~0;
- mtx_destroy(&bufObj->Mutex);
+ simple_mtx_destroy(&bufObj->Mutex);
free(bufObj->Label);
free(bufObj);
}
@@ -493,11 +493,11 @@ _mesa_reference_buffer_object_(struct gl_context *ctx,
GLboolean deleteFlag = GL_FALSE;
struct gl_buffer_object *oldObj = *ptr;
- mtx_lock(&oldObj->Mutex);
+ simple_mtx_lock(&oldObj->Mutex);
assert(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
- mtx_unlock(&oldObj->Mutex);
+ simple_mtx_unlock(&oldObj->Mutex);
if (deleteFlag) {
assert(ctx->Driver.DeleteBuffer);
@@ -510,12 +510,12 @@ _mesa_reference_buffer_object_(struct gl_context *ctx,
if (bufObj) {
/* reference new buffer */
- mtx_lock(&bufObj->Mutex);
+ simple_mtx_lock(&bufObj->Mutex);
assert(bufObj->RefCount > 0);
bufObj->RefCount++;
*ptr = bufObj;
- mtx_unlock(&bufObj->Mutex);
+ simple_mtx_unlock(&bufObj->Mutex);
}
}
@@ -547,7 +547,7 @@ _mesa_initialize_buffer_object(struct gl_context *ctx,
GLuint name)
{
memset(obj, 0, sizeof(struct gl_buffer_object));
- mtx_init(&obj->Mutex, mtx_plain);
+ simple_mtx_init(&obj->Mutex, mtx_plain);
obj->RefCount = 1;
obj->Name = name;
obj->Usage = GL_STATIC_DRAW_ARB;
@@ -870,7 +870,7 @@ _mesa_init_buffer_objects( struct gl_context *ctx )
GLuint i;
memset(&DummyBufferObject, 0, sizeof(DummyBufferObject));
- mtx_init(&DummyBufferObject.Mutex, mtx_plain);
+ simple_mtx_init(&DummyBufferObject.Mutex, mtx_plain);
DummyBufferObject.RefCount = 1000*1000*1000; /* never delete */
_mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,