From 9528dc6ed8d09eba0dc3be17dc5e9ef4add8083c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 23 Oct 2009 14:37:41 -0600 Subject: mesa: added _mesa_compressed_format_to_glenum() Maps a compressed MESA_FORMAT_x to correspding GLenum. Needed for querying a texture's actual format when a generic format was originally requested. --- src/mesa/main/texcompress.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 44f3338222..0f1a38f88e 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -52,6 +52,10 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img, GLsizei width, const GLubyte *image); +extern GLenum +_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat); + + extern void _mesa_init_texture_s3tc( GLcontext *ctx ); -- cgit v1.2.3 From 1ad9671db7bd60fa84266f30f46555b4e45bcb08 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 24 Oct 2009 11:41:25 -0600 Subject: mesa: s/GLuint/gl_format/ --- src/mesa/main/texcompress.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 44f3338222..13af148394 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -26,6 +26,7 @@ #define TEXCOMPRESS_H #include "mtypes.h" +#include "formats.h" #if _HAVE_FULL_GL @@ -35,7 +36,7 @@ _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all); extern GLuint _mesa_compressed_texture_size( GLcontext *ctx, GLsizei width, GLsizei height, GLsizei depth, - GLuint mesaFormat ); + gl_format mesaFormat ); extern GLuint _mesa_compressed_texture_size_glenum(GLcontext *ctx, @@ -43,12 +44,12 @@ _mesa_compressed_texture_size_glenum(GLcontext *ctx, GLsizei depth, GLenum glformat); extern GLint -_mesa_compressed_row_stride(GLuint mesaFormat, GLsizei width); +_mesa_compressed_row_stride(gl_format mesaFormat, GLsizei width); extern GLubyte * _mesa_compressed_image_address(GLint col, GLint row, GLint img, - GLuint mesaFormat, + gl_format mesaFormat, GLsizei width, const GLubyte *image); -- cgit v1.2.3 From d6ee86c77a8e1543557fd64c1f1c354baa0a8ad8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 24 Oct 2009 16:49:57 -0600 Subject: mesa: remove _mesa_compressed_texture_size() Use _mesa_format_image_size() instead. --- src/mesa/main/texcompress.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 13af148394..70247098b2 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -33,11 +33,6 @@ extern GLuint _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all); -extern GLuint -_mesa_compressed_texture_size( GLcontext *ctx, - GLsizei width, GLsizei height, GLsizei depth, - gl_format mesaFormat ); - extern GLuint _mesa_compressed_texture_size_glenum(GLcontext *ctx, GLsizei width, GLsizei height, @@ -64,7 +59,6 @@ _mesa_init_texture_fxt1( GLcontext *ctx ); /* no-op macros */ #define _mesa_get_compressed_formats( c, f ) 0 -#define _mesa_compressed_texture_size( c, w, h, d, f ) 0 #define _mesa_compressed_texture_size_glenum( c, w, h, d, f ) 0 #define _mesa_compressed_row_stride( f, w) 0 #define _mesa_compressed_image_address(c, r, i, f, w, i2 ) 0 -- cgit v1.2.3 From 54bb414e00a4daedbe530b9933bc11bac4ae7149 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 25 Oct 2009 16:59:08 -0600 Subject: mesa: clean-up, simplify compressed texture size checking --- src/mesa/main/texcompress.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 70247098b2..43cd741895 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -33,10 +33,8 @@ extern GLuint _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all); -extern GLuint -_mesa_compressed_texture_size_glenum(GLcontext *ctx, - GLsizei width, GLsizei height, - GLsizei depth, GLenum glformat); +extern gl_format +_mesa_glenum_to_compressed_format(GLenum format); extern GLint _mesa_compressed_row_stride(gl_format mesaFormat, GLsizei width); -- cgit v1.2.3 From 20c6c5853261b31ecd50d58e0aae9b92f25e41db Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 25 Oct 2009 17:25:46 -0600 Subject: mesa: remove _mesa_compressed_row_stride() --- src/mesa/main/texcompress.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 43cd741895..d6c16e936c 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -36,10 +36,6 @@ _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all); extern gl_format _mesa_glenum_to_compressed_format(GLenum format); -extern GLint -_mesa_compressed_row_stride(gl_format mesaFormat, GLsizei width); - - extern GLubyte * _mesa_compressed_image_address(GLint col, GLint row, GLint img, gl_format mesaFormat, @@ -58,7 +54,6 @@ _mesa_init_texture_fxt1( GLcontext *ctx ); /* no-op macros */ #define _mesa_get_compressed_formats( c, f ) 0 #define _mesa_compressed_texture_size_glenum( c, w, h, d, f ) 0 -#define _mesa_compressed_row_stride( f, w) 0 #define _mesa_compressed_image_address(c, r, i, f, w, i2 ) 0 #define _mesa_compress_teximage( c, w, h, sF, s, sRS, dF, d, drs ) ((void)0) -- cgit v1.2.3 From 355b5bde5056297f4f1636850449b91626958408 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 25 Oct 2009 17:32:56 -0600 Subject: mesa: remove _mesa_compressed_texture_size_glenum() stub --- src/mesa/main/texcompress.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index d6c16e936c..5ac93ddd18 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -53,7 +53,6 @@ _mesa_init_texture_fxt1( GLcontext *ctx ); /* no-op macros */ #define _mesa_get_compressed_formats( c, f ) 0 -#define _mesa_compressed_texture_size_glenum( c, w, h, d, f ) 0 #define _mesa_compressed_image_address(c, r, i, f, w, i2 ) 0 #define _mesa_compress_teximage( c, w, h, sF, s, sRS, dF, d, drs ) ((void)0) -- cgit v1.2.3 From bc143b1a9ffc16af27b2e7183ca3ec59ad5a7c89 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 28 Oct 2009 21:25:56 -0600 Subject: mesa: minor code movement --- src/mesa/main/texcompress.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 9c58425fc9..418416746c 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -36,16 +36,15 @@ _mesa_get_compressed_formats(GLcontext *ctx, GLint *formats, GLboolean all); extern gl_format _mesa_glenum_to_compressed_format(GLenum format); +extern GLenum +_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat); + extern GLubyte * _mesa_compressed_image_address(GLint col, GLint row, GLint img, gl_format mesaFormat, GLsizei width, const GLubyte *image); -extern GLenum -_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat); - - extern void _mesa_init_texture_s3tc( GLcontext *ctx ); -- cgit v1.2.3 From 20e20fc5afa7525e247fd607e04d9adfffe730b4 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 29 Oct 2009 14:14:04 +0800 Subject: mesa/main: Make FEATURE_texture_fxt1 follow feature conventions. Also remove the unused initialization and GLchan fetch functions. Signed-off-by: Chia-I Wu --- src/mesa/main/texcompress.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index 418416746c..d4873db54a 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -48,9 +48,6 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img, extern void _mesa_init_texture_s3tc( GLcontext *ctx ); -extern void -_mesa_init_texture_fxt1( GLcontext *ctx ); - #else /* _HAVE_FULL_GL */ -- cgit v1.2.3 From 59798cd8864b601e035cf2414517cd90d24ed786 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 29 Oct 2009 14:59:42 +0800 Subject: mesa/main: Make FEATURE_texture_s3tc follow feature conventions. Signed-off-by: Chia-I Wu --- src/mesa/main/texcompress.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mesa/main/texcompress.h') diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h index d4873db54a..5e73a3149b 100644 --- a/src/mesa/main/texcompress.h +++ b/src/mesa/main/texcompress.h @@ -44,11 +44,6 @@ _mesa_compressed_image_address(GLint col, GLint row, GLint img, gl_format mesaFormat, GLsizei width, const GLubyte *image); - -extern void -_mesa_init_texture_s3tc( GLcontext *ctx ); - - #else /* _HAVE_FULL_GL */ /* no-op macros */ -- cgit v1.2.3