diff options
author | Brian Paul <[email protected]> | 2002-09-21 16:51:25 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-09-21 16:51:25 +0000 |
commit | c5b995066020191982b2315fc45d05e068eee761 (patch) | |
tree | 9ca2e3a49b84631aa61ef97d072439228478b3cb /src/mesa/main/texutil_tmp.h | |
parent | c62aeed003cc20b189d71bc53256419e0d630aaf (diff) |
updates from 4.0.4 (MESA_ycbcr_texture, APPLE_client_storage, etc)
Diffstat (limited to 'src/mesa/main/texutil_tmp.h')
-rw-r--r-- | src/mesa/main/texutil_tmp.h | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/mesa/main/texutil_tmp.h b/src/mesa/main/texutil_tmp.h index 7a70a55d024..3a225aaac54 100644 --- a/src/mesa/main/texutil_tmp.h +++ b/src/mesa/main/texutil_tmp.h @@ -1,4 +1,4 @@ -/* $Id: texutil_tmp.h,v 1.10 2002/06/29 19:48:16 brianp Exp $ */ +/* $Id: texutil_tmp.h,v 1.11 2002/09/21 16:51:25 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -28,14 +28,27 @@ */ - /* - * NOTE: All 3D teximage code is untested and most definitely broken... + * For 2D and 3D texture images, we generate functions for + * - conversion without pixel unpacking and standard stride + * - conversion without pixel unpacking and non-standard stride + * - conversion with pixel unpacking and standard stride + * - conversion with pixel unpacking and non-standard stride + * + * + * Macros which need to be defined before including this file: + * TAG(x) - the function name wrapper + * DST_TYPE - the destination texel datatype (GLuint, GLushort, etc) + * DST_TEXELS_PER_DWORD - number of dest texels that'll fit in 4 bytes + * CONVERT_TEXEL - code to convert from source to dest texel + * CONVER_TEXEL_DWORD - if multiple texels fit in 4 bytes, this macros + * will convert/store multiple texels at once + * CONVERT_DIRECT - if defined, just memcpy texels from src to dest + * SRC_TEXEL_BYTES - bytes per source texel + * PRESERVE_DST_TYPE - if defined, don't undefined these macros at end */ - - #define DST_TEXEL_BYTES (4 / DST_TEXELS_PER_DWORD) #define DST_ROW_BYTES (convert->width * DST_TEXEL_BYTES) #define DST_ROW_STRIDE (convert->dstImageWidth * DST_TEXEL_BYTES) @@ -47,7 +60,7 @@ * PRE: No pixelstore attribs, width == dstImageWidth. */ static GLboolean -TAG(texsubimage2d)( struct gl_texture_convert *convert ) +TAG(texsubimage2d)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *)convert->srcImage; GLuint *dst = (GLuint *)((GLubyte *)convert->dstImage + @@ -83,7 +96,7 @@ TAG(texsubimage2d)( struct gl_texture_convert *convert ) /* PRE: As above, height == dstImageHeight also. */ static GLboolean -TAG(texsubimage3d)( struct gl_texture_convert *convert ) +TAG(texsubimage3d)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *)convert->srcImage; GLuint *dst = (GLuint *)((GLubyte *)convert->dstImage + @@ -122,7 +135,7 @@ TAG(texsubimage3d)( struct gl_texture_convert *convert ) * PRE: No pixelstore attribs, width != dstImageWidth. */ static GLboolean -TAG(texsubimage2d_stride)( struct gl_texture_convert *convert ) +TAG(texsubimage2d_stride)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *)convert->srcImage; DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + @@ -155,7 +168,7 @@ TAG(texsubimage2d_stride)( struct gl_texture_convert *convert ) /* PRE: As above, or height != dstImageHeight also. */ static GLboolean -TAG(texsubimage3d_stride)( struct gl_texture_convert *convert ) +TAG(texsubimage3d_stride)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *)convert->srcImage; DST_TYPE *dst = (DST_TYPE *)((GLubyte *)convert->dstImage + @@ -195,7 +208,7 @@ TAG(texsubimage3d_stride)( struct gl_texture_convert *convert ) * PRE: Require pixelstore attribs, width == dstImageWidth. */ static GLboolean -TAG(texsubimage2d_unpack)( struct gl_texture_convert *convert ) +TAG(texsubimage2d_unpack)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *) _mesa_image_address( convert->unpacking, convert->srcImage, @@ -253,7 +266,7 @@ TAG(texsubimage2d_unpack)( struct gl_texture_convert *convert ) /* PRE: as above, height == dstImageHeight also. */ static GLboolean -TAG(texsubimage3d_unpack)( struct gl_texture_convert *convert ) +TAG(texsubimage3d_unpack)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *) _mesa_image_address( convert->unpacking, convert->srcImage, @@ -328,7 +341,7 @@ TAG(texsubimage3d_unpack)( struct gl_texture_convert *convert ) * PRE: Require pixelstore attribs, width != dstImageWidth. */ static GLboolean -TAG(texsubimage2d_stride_unpack)( struct gl_texture_convert *convert ) +TAG(texsubimage2d_stride_unpack)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *) _mesa_image_address( convert->unpacking, convert->srcImage, @@ -376,7 +389,7 @@ TAG(texsubimage2d_stride_unpack)( struct gl_texture_convert *convert ) /* PRE: As above, or height != dstImageHeight also. */ static GLboolean -TAG(texsubimage3d_stride_unpack)( struct gl_texture_convert *convert ) +TAG(texsubimage3d_stride_unpack)( const struct convert_info *convert ) { const GLubyte *src = (const GLubyte *) _mesa_image_address( convert->unpacking, convert->srcImage, |