diff options
author | Laura Ekstrand <[email protected]> | 2014-12-04 10:44:25 -0800 |
---|---|---|
committer | Laura Ekstrand <[email protected]> | 2015-01-08 11:37:28 -0800 |
commit | d7528fce5abed95668ff97c46e68c94a08bbe30c (patch) | |
tree | 8abdc79c2adce89b74c022331764003dbc401496 /src/mesa/main/texobj.h | |
parent | 838ef5b7816bf7a2fbde25b602b5150e92398c0a (diff) |
main: Moved _mesa_lock_texture and _mesa_unlock_texture to texobj.h from teximage.h.
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.h')
-rw-r--r-- | src/mesa/main/texobj.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index 109264e8901..51bdbbdc5ea 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -98,6 +98,24 @@ _mesa_reference_texobj(struct gl_texture_object **ptr, _mesa_reference_texobj_(ptr, tex); } +/** + * Lock a texture for updating. See also _mesa_lock_context_textures(). + */ +static inline void +_mesa_lock_texture(struct gl_context *ctx, struct gl_texture_object *texObj) +{ + mtx_lock(&ctx->Shared->TexMutex); + ctx->Shared->TextureStateStamp++; + (void) texObj; +} + +static inline void +_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj) +{ + (void) texObj; + mtx_unlock(&ctx->Shared->TexMutex); +} + /** * Return number of faces for a texture target. This will be 6 for |