projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
glapi: ARB_blend_func_extended support + regen. (v2)
[mesa.git]
/
src
/
mesa
/
main
/
teximage.h
diff --git
a/src/mesa/main/teximage.h
b/src/mesa/main/teximage.h
index 0dcacab3cd09ea4bd41bb23ae6c92e2b28898ede..e2bdaca01505e01b735f738bb0e1778c53431564 100644
(file)
--- a/
src/mesa/main/teximage.h
+++ b/
src/mesa/main/teximage.h
@@
-33,20
+33,31
@@
#include "mtypes.h"
#include "mtypes.h"
+#include "formats.h"
-extern void *
-_mesa_alloc_texmemory(GLsizei bytes);
-
-extern void
-_mesa_free_texmemory(void *m);
+/** Is the given value one of the 6 cube faces? */
+static inline GLboolean
+_mesa_is_cube_face(GLenum target)
+{
+ return (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB);
+}
+/** Is any of the dimensions of given texture equal to zero? */
+static inline GLboolean
+_mesa_is_zero_size_texture(const struct gl_texture_image *texImage)
+{
+ return (texImage->Width == 0 ||
+ texImage->Height == 0 ||
+ texImage->Depth == 0);
+}
/** \name Internal functions */
/*@{*/
extern GLint
/** \name Internal functions */
/*@{*/
extern GLint
-_mesa_base_tex_format(
GL
context *ctx, GLint internalFormat );
+_mesa_base_tex_format(
struct gl_
context *ctx, GLint internalFormat );
extern GLboolean
extern GLboolean
@@
-54,70
+65,68
@@
_mesa_is_proxy_texture(GLenum target);
extern struct gl_texture_image *
extern struct gl_texture_image *
-_mesa_new_texture_image( GLcontext *ctx );
-
+_mesa_new_texture_image( struct gl_context *ctx );
-extern void
-_mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *teximage );
extern void
extern void
-_mesa_
free_texture_image_data( GLcontext *ctx,
-
struct gl_texture_image *texI
mage );
+_mesa_
delete_texture_image( struct gl_context *ctx,
+
struct gl_texture_image *texi
mage );
extern void
extern void
-_mesa_init_teximage_fields(
GLcontext *ctx, GLenum target
,
+_mesa_init_teximage_fields(
struct gl_context *ctx
,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
- GLint border, GLenum internalFormat);
+ GLint border, GLenum internalFormat,
+ gl_format format);
-extern
void
-_mesa_choose_texture_format(
GL
context *ctx,
+extern
gl_format
+_mesa_choose_texture_format(
struct gl_
context *ctx,
struct gl_texture_object *texObj,
struct gl_texture_object *texObj,
- struct gl_texture_image *texImage,
GLenum target, GLint level,
GLenum internalFormat, GLenum format, GLenum type);
GLenum target, GLint level,
GLenum internalFormat, GLenum format, GLenum type);
-
extern void
extern void
-_mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage);
-
+_mesa_update_fbo_texture(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLuint face, GLuint level);
extern void
extern void
-_mesa_set_tex_image(struct gl_texture_object *tObj,
- GLenum target, GLint level,
- struct gl_texture_image *texImage);
+_mesa_clear_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage);
extern struct gl_texture_object *
extern struct gl_texture_object *
-_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+_mesa_select_tex_object(struct gl_context *ctx,
+ const struct gl_texture_unit *texUnit,
GLenum target);
extern struct gl_texture_object *
GLenum target);
extern struct gl_texture_object *
-_mesa_get_current_tex_object(
GL
context *ctx, GLenum target);
+_mesa_get_current_tex_object(
struct gl_
context *ctx, GLenum target);
extern struct gl_texture_image *
extern struct gl_texture_image *
-_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
+_mesa_select_tex_image(struct gl_context *ctx,
+ const struct gl_texture_object *texObj,
GLenum target, GLint level);
extern struct gl_texture_image *
GLenum target, GLint level);
extern struct gl_texture_image *
-_mesa_get_tex_image(
GL
context *ctx, struct gl_texture_object *texObj,
+_mesa_get_tex_image(
struct gl_
context *ctx, struct gl_texture_object *texObj,
GLenum target, GLint level);
extern struct gl_texture_image *
GLenum target, GLint level);
extern struct gl_texture_image *
-_mesa_get_proxy_tex_image(
GL
context *ctx, GLenum target, GLint level);
+_mesa_get_proxy_tex_image(
struct gl_
context *ctx, GLenum target, GLint level);
extern GLint
extern GLint
-_mesa_max_texture_levels(
GL
context *ctx, GLenum target);
+_mesa_max_texture_levels(
struct gl_
context *ctx, GLenum target);
extern GLboolean
extern GLboolean
-_mesa_test_proxy_teximage(
GL
context *ctx, GLenum target, GLint level,
+_mesa_test_proxy_teximage(
struct gl_
context *ctx, GLenum target, GLint level,
GLint internalFormat, GLenum format, GLenum type,
GLint width, GLint height, GLint depth, GLint border);
GLint internalFormat, GLenum format, GLenum type,
GLint width, GLint height, GLint depth, GLint border);
@@
-125,21
+134,24
@@
_mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
extern GLuint
_mesa_tex_target_to_face(GLenum target);
extern GLuint
_mesa_tex_target_to_face(GLenum target);
+extern GLint
+_mesa_get_texture_dimensions(GLenum target);
/**
* 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(
GL
context *ctx, struct gl_texture_object *texObj)
+static
inline
void
+_mesa_lock_texture(
struct gl_
context *ctx, struct gl_texture_object *texObj)
{
_glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
ctx->Shared->TextureStateStamp++;
(void) texObj;
}
{
_glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
ctx->Shared->TextureStateStamp++;
(void) texObj;
}
-static
INLINE
void
-_mesa_unlock_texture(
GL
context *ctx, struct gl_texture_object *texObj)
+static
inline
void
+_mesa_unlock_texture(
struct gl_
context *ctx, struct gl_texture_object *texObj)
{
{
+ (void) texObj;
_glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
}
_glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
}
@@
-268,6
+280,11
@@
_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
GLsizei height, GLsizei depth, GLenum format,
GLsizei imageSize, const GLvoid *data);
GLsizei height, GLsizei depth, GLenum format,
GLsizei imageSize, const GLvoid *data);
+
+extern void GLAPIENTRY
+_mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer);
+
+
/*@}*/
#endif
/*@}*/
#endif