summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2014-01-17 18:35:31 +0100
committerFredrik Höglund <[email protected]>2014-05-02 02:53:25 +0200
commitb8ee235e721ffd2503f4e8114d38685d58a0ceae (patch)
tree55ccb1ab8589a39f36c9770afbe4d663585e0ae6 /src/mesa/main/texobj.c
parentb16e2ada4c41aab085da8cc5b93150825a674370 (diff)
mesa: Add helper functions for looking up multiple textures
Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 38be9ee56dd..221746ffd0e 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -61,6 +61,27 @@ _mesa_lookup_texture(struct gl_context *ctx, GLuint id)
}
+void
+_mesa_begin_texture_lookups(struct gl_context *ctx)
+{
+ _mesa_HashLockMutex(ctx->Shared->TexObjects);
+}
+
+
+void
+_mesa_end_texture_lookups(struct gl_context *ctx)
+{
+ _mesa_HashUnlockMutex(ctx->Shared->TexObjects);
+}
+
+
+struct gl_texture_object *
+_mesa_lookup_texture_locked(struct gl_context *ctx, GLuint id)
+{
+ return (struct gl_texture_object *)
+ _mesa_HashLookupLocked(ctx->Shared->TexObjects, id);
+}
+
/**
* Allocate and initialize a new texture object. But don't put it into the