mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 09:50:20 +01:00
improve some comments, clean-up formatting
This commit is contained in:
parent
3898e67f49
commit
a01ee8ff0b
3 changed files with 23 additions and 11 deletions
|
|
@ -107,18 +107,19 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
|
|||
GLint width, GLint height, GLint depth, GLint border);
|
||||
|
||||
|
||||
/* Lock a texture for updating. See also _mesa_lock_context_textures().
|
||||
/**
|
||||
* Lock a texture for updating. See also _mesa_lock_context_textures().
|
||||
*/
|
||||
static INLINE void _mesa_lock_texture(GLcontext *ctx,
|
||||
struct gl_texture_object *texObj)
|
||||
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)
|
||||
static INLINE void
|
||||
_mesa_unlock_texture(GLcontext *ctx, struct gl_texture_object *texObj)
|
||||
{
|
||||
_glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1097,14 +1097,21 @@ _mesa_IsTexture( GLuint texture )
|
|||
return t && t->Target;
|
||||
}
|
||||
|
||||
/* Simplest implementation of texture locking: Grab the a new mutex in
|
||||
|
||||
/**
|
||||
* Simplest implementation of texture locking: Grab the a new mutex in
|
||||
* the shared context. Examine the shared context state timestamp and
|
||||
* if there has been a change, set the appropriate bits in
|
||||
* ctx->NewState.
|
||||
*
|
||||
* See also _mesa_lock/unlock_texture in texobj.h
|
||||
* This is used to deal with synchronizing things when a texture object
|
||||
* is used/modified by different contexts (or threads) which are sharing
|
||||
* the texture.
|
||||
*
|
||||
* See also _mesa_lock/unlock_texture() in teximage.h
|
||||
*/
|
||||
void _mesa_lock_context_textures( GLcontext *ctx )
|
||||
void
|
||||
_mesa_lock_context_textures( GLcontext *ctx )
|
||||
{
|
||||
_glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
|
||||
|
||||
|
|
@ -1115,7 +1122,8 @@ void _mesa_lock_context_textures( GLcontext *ctx )
|
|||
}
|
||||
|
||||
|
||||
void _mesa_unlock_context_textures( GLcontext *ctx )
|
||||
void
|
||||
_mesa_unlock_context_textures( GLcontext *ctx )
|
||||
{
|
||||
assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp);
|
||||
_glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
|
||||
|
|
|
|||
|
|
@ -61,8 +61,11 @@ extern void
|
|||
_mesa_test_texobj_completeness( const GLcontext *ctx,
|
||||
struct gl_texture_object *obj );
|
||||
|
||||
extern void _mesa_unlock_context_textures( GLcontext *ctx );
|
||||
extern void _mesa_lock_context_textures( GLcontext *ctx );
|
||||
extern void
|
||||
_mesa_unlock_context_textures( GLcontext *ctx );
|
||||
|
||||
extern void
|
||||
_mesa_lock_context_textures( GLcontext *ctx );
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue