summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-06 11:00:15 +1000
committerTimothy Arceri <[email protected]>2017-04-07 08:02:54 +1000
commit31cb6fd0a3069ac7c03c1ce28b2f24d8bb9a4154 (patch)
tree5dec845e2b118767a4ebb740d0558e30235bf37a /src/mesa/main/bufferobj.c
parentc9c39812b91c8104bc0bea16053312547846249c (diff)
mesa: stop abstracting buffer object hashtable locking
This doesn't do anything useful so just remove it. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/main/bufferobj.c')
-rw-r--r--src/mesa/main/bufferobj.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 0a2c1f0a661..922c7d82fcb 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1119,20 +1119,6 @@ _mesa_lookup_bufferobj_err(struct gl_context *ctx, GLuint buffer,
}
-void
-_mesa_begin_bufferobj_lookups(struct gl_context *ctx)
-{
- _mesa_HashLockMutex(ctx->Shared->BufferObjects);
-}
-
-
-void
-_mesa_end_bufferobj_lookups(struct gl_context *ctx)
-{
- _mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
-}
-
-
/**
* Look up a buffer object for a multi-bind function.
*
@@ -1147,7 +1133,8 @@ _mesa_end_bufferobj_lookups(struct gl_context *ctx)
* returns NULL.
*
* This function assumes that the caller has already locked the
- * hash table mutex by calling _mesa_begin_bufferobj_lookups().
+ * hash table mutex by calling
+ * _mesa_HashLockMutex(ctx->Shared->BufferObjects).
*/
struct gl_buffer_object *
_mesa_multi_bind_lookup_bufferobj(struct gl_context *ctx,
@@ -3253,7 +3240,7 @@ bind_uniform_buffers(struct gl_context *ctx, GLuint first, GLsizei count,
* parameters are valid and no other error occurs."
*/
- _mesa_begin_bufferobj_lookups(ctx);
+ _mesa_HashLockMutex(ctx->Shared->BufferObjects);
for (i = 0; i < count; i++) {
struct gl_uniform_buffer_binding *binding =
@@ -3313,7 +3300,7 @@ bind_uniform_buffers(struct gl_context *ctx, GLuint first, GLsizei count,
}
}
- _mesa_end_bufferobj_lookups(ctx);
+ _mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
}
static void
@@ -3365,7 +3352,7 @@ bind_shader_storage_buffers(struct gl_context *ctx, GLuint first,
* parameters are valid and no other error occurs."
*/
- _mesa_begin_bufferobj_lookups(ctx);
+ _mesa_HashLockMutex(ctx->Shared->BufferObjects);
for (i = 0; i < count; i++) {
struct gl_shader_storage_buffer_binding *binding =
@@ -3425,7 +3412,7 @@ bind_shader_storage_buffers(struct gl_context *ctx, GLuint first,
}
}
- _mesa_end_bufferobj_lookups(ctx);
+ _mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
}
static bool
@@ -3544,7 +3531,7 @@ bind_xfb_buffers(struct gl_context *ctx,
* parameters are valid and no other error occurs."
*/
- _mesa_begin_bufferobj_lookups(ctx);
+ _mesa_HashLockMutex(ctx->Shared->BufferObjects);
for (i = 0; i < count; i++) {
const GLuint index = first + i;
@@ -3610,7 +3597,7 @@ bind_xfb_buffers(struct gl_context *ctx,
offset, size);
}
- _mesa_end_bufferobj_lookups(ctx);
+ _mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
}
static bool
@@ -3707,7 +3694,7 @@ bind_atomic_buffers(struct gl_context *ctx,
* parameters are valid and no other error occurs."
*/
- _mesa_begin_bufferobj_lookups(ctx);
+ _mesa_HashLockMutex(ctx->Shared->BufferObjects);
for (i = 0; i < count; i++) {
struct gl_atomic_buffer_binding *binding =
@@ -3760,7 +3747,7 @@ bind_atomic_buffers(struct gl_context *ctx,
set_atomic_buffer_binding(ctx, binding, bufObj, offset, size);
}
- _mesa_end_bufferobj_lookups(ctx);
+ _mesa_HashUnlockMutex(ctx->Shared->BufferObjects);
}
void GLAPIENTRY