summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/renderbuffer.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/renderbuffer.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/renderbuffer.c')
-rw-r--r--src/mesa/main/renderbuffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 925001a76a3..0e017125ac0 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -40,7 +40,7 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name)
{
GET_CURRENT_CONTEXT(ctx);
- mtx_init(&rb->Mutex, mtx_plain);
+ simple_mtx_init(&rb->Mutex, mtx_plain);
rb->ClassID = 0;
rb->Name = name;
@@ -101,7 +101,7 @@ _mesa_new_renderbuffer(struct gl_context *ctx, GLuint name)
void
_mesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
{
- mtx_destroy(&rb->Mutex);
+ simple_mtx_destroy(&rb->Mutex);
free(rb->Label);
free(rb);
}
@@ -201,11 +201,11 @@ _mesa_reference_renderbuffer_(struct gl_renderbuffer **ptr,
GLboolean deleteFlag = GL_FALSE;
struct gl_renderbuffer *oldRb = *ptr;
- mtx_lock(&oldRb->Mutex);
+ simple_mtx_lock(&oldRb->Mutex);
assert(oldRb->RefCount > 0);
oldRb->RefCount--;
deleteFlag = (oldRb->RefCount == 0);
- mtx_unlock(&oldRb->Mutex);
+ simple_mtx_unlock(&oldRb->Mutex);
if (deleteFlag) {
GET_CURRENT_CONTEXT(ctx);
@@ -218,9 +218,9 @@ _mesa_reference_renderbuffer_(struct gl_renderbuffer **ptr,
if (rb) {
/* reference new renderbuffer */
- mtx_lock(&rb->Mutex);
+ simple_mtx_lock(&rb->Mutex);
rb->RefCount++;
- mtx_unlock(&rb->Mutex);
+ simple_mtx_unlock(&rb->Mutex);
*ptr = rb;
}
}