[Mesa-dev] [PATCH 1/2] mesa/main: inline {begin, end}_samplerobj_lookups()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Mar 9 09:50:13 UTC 2017
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/main/samplerobj.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index c073f4221e..95d3d5933f 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -60,20 +60,6 @@ _mesa_lookup_samplerobj_locked(struct gl_context *ctx, GLuint name)
_mesa_HashLookupLocked(ctx->Shared->SamplerObjects, name);
}
-static inline void
-begin_samplerobj_lookups(struct gl_context *ctx)
-{
- _mesa_HashLockMutex(ctx->Shared->SamplerObjects);
-}
-
-
-static inline void
-end_samplerobj_lookups(struct gl_context *ctx)
-{
- _mesa_HashUnlockMutex(ctx->Shared->SamplerObjects);
-}
-
-
static inline struct gl_sampler_object *
lookup_samplerobj_locked(struct gl_context *ctx, GLuint name)
{
@@ -363,7 +349,7 @@ _mesa_BindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
* their parameters are valid and no other error occurs."
*/
- begin_samplerobj_lookups(ctx);
+ _mesa_HashLockMutex(ctx->Shared->SamplerObjects);
for (i = 0; i < count; i++) {
const GLuint unit = first + i;
@@ -403,7 +389,7 @@ _mesa_BindSamplers(GLuint first, GLsizei count, const GLuint *samplers)
}
}
- end_samplerobj_lookups(ctx);
+ _mesa_HashUnlockMutex(ctx->Shared->SamplerObjects);
} else {
/* Unbind all samplers in the range <first> through <first>+<count>-1 */
for (i = 0; i < count; i++) {
--
2.12.0
More information about the mesa-dev
mailing list