diff options
author | Keith Whitwell <[email protected]> | 2006-11-01 14:21:57 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2006-11-01 14:21:57 +0000 |
commit | 5ac93f86210eb5c2a8dee74ec19b0ecd54376863 (patch) | |
tree | ea7acd0170a8b35a4a331b05c5910bc574c8f050 /src/mesa/main/teximage.h | |
parent | 232a489b41097b462fc0ad2b88f0df75a1abd4c3 (diff) |
Merge texmem-0-3-branch.
Diffstat (limited to 'src/mesa/main/teximage.h')
-rw-r--r-- | src/mesa/main/teximage.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 410789fe046..68457f4728c 100644 --- a/src/mesa/main/teximage.h +++ b/src/mesa/main/teximage.h @@ -84,12 +84,12 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit, extern struct gl_texture_image * -_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit, +_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj, GLenum target, GLint level); extern struct gl_texture_image * -_mesa_get_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit, +_mesa_get_tex_image(GLcontext *ctx, struct gl_texture_object *texObj, GLenum target, GLint level); @@ -106,6 +106,23 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLenum format, GLenum type, GLint width, GLint height, GLint depth, GLint border); + +/* Lock a texture for updating. See also _mesa_lock_context_textures(). + */ +static INLINE void _mesa_lock_texture(GLcontext *ctx, + struct gl_texture_object *texObj) +{ + _glthread_LOCK_MUTEX(ctx->Shared->TexMutex); + ctx->Shared->TextureStateStamp++; + (void) texObj; +} + +static INLINE void _mesa_unlock_texture(GLcontext *ctx, + struct gl_texture_object *texObj) +{ + _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex); +} + /*@}*/ |