extern GLboolean
_mesa_is_proxy_texture(GLenum target);
-extern GLenum
-_mesa_get_proxy_target(GLenum target);
-
extern struct gl_texture_image *
_mesa_new_texture_image( struct gl_context *ctx );
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum internalFormat,
- gl_format format);
+ mesa_format format);
-extern gl_format
+extern mesa_format
_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum target, GLint level,
struct gl_texture_image *texImage);
-extern struct gl_texture_object *
-_mesa_select_tex_object(struct gl_context *ctx,
- const struct gl_texture_unit *texUnit,
- GLenum target);
-
extern struct gl_texture_object *
_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target);
extern GLboolean
_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
- gl_format format,
+ mesa_format format,
GLint width, GLint height, GLint depth, GLint border);
GLint level, GLint width, GLint height,
GLint depth, GLint border);
-extern gl_format
+extern mesa_format
_mesa_validate_texbuffer_format(const struct gl_context *ctx,
GLenum internalFormat);
+
+bool
+_mesa_legal_texture_base_format_for_target(struct gl_context *ctx,
+ GLenum target,
+ GLenum internalFormat,
+ 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)
{
- _glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
+ mtx_lock(&ctx->Shared->TexMutex);
ctx->Shared->TextureStateStamp++;
(void) texObj;
}
_mesa_unlock_texture(struct gl_context *ctx, struct gl_texture_object *texObj)
{
(void) texObj;
- _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
+ mtx_unlock(&ctx->Shared->TexMutex);
}
/*@}*/