main: Moved _mesa_lock_texture and _mesa_unlock_texture to texobj.h from teximage.h.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Laura Ekstrand
2014-12-04 10:44:25 -08:00
parent 838ef5b781
commit d7528fce5a
5 changed files with 21 additions and 19 deletions

View File

@@ -29,6 +29,7 @@
#include "main/enums.h"
#include "main/image.h"
#include "main/teximage.h"
#include "main/texobj.h"
#include "main/texstate.h"
#include "main/fbobject.h"

View File

@@ -54,6 +54,7 @@
#include "main/teximage.h"
#include "main/texformat.h"
#include "main/texobj.h"
#include "main/texstate.h"
#include "swrast_priv.h"

View File

@@ -44,10 +44,10 @@
#include "texcompress.h"
#include "texgetimage.h"
#include "teximage.h"
#include "texobj.h"
#include "texstore.h"
/**
* Can the given type represent negative values?
*/

View File

@@ -169,24 +169,6 @@ _mesa_legal_texture_base_format_for_target(struct gl_context *ctx,
unsigned dimensions,
const char *caller);
/**
* 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);
}
/*@}*/

View File

@@ -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