core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

texformat.c File Reference


Detailed Description

Texture formats.

Author:
Gareth Hughes

#include "colormac.h"
#include "context.h"
#include "texformat.h"
#include "texstore.h"
#include "texformat_tmp.h"

Defines

#define DIM   1
#define DIM   2
#define DIM   3

Functions

static void fetch_null_texel (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLchan *texel)
 Null texel fetch function.
static void fetch_null_texelf (const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel)
static void store_null_texel (struct gl_texture_image *texImage, GLint i, GLint j, GLint k, const void *texel)
struct gl_texture_format_mesa_choose_tex_format (GLcontext *ctx, GLint internalFormat, GLenum format, GLenum type)
 Choose an appropriate texture format given the format, type and internalFormat parameters passed to glTexImage().
void _mesa_format_to_type_and_comps (const struct gl_texture_format *format, GLenum *datatype, GLuint *comps)
 Return datatype and number of components per texel for the given gl_texture_format.

Variables

Default GLchan-based formats
Notes about the predefined gl_texture_formats:

1. There are 1D, 2D and 3D functions for fetching texels from texture images, returning both GLchan values and GLfloat values. (six functions in total) You don't have to provide both the GLchan and GLfloat functions; just one or the other is OK. Mesa will use an "adaptor" to convert between GLchan/GLfloat when needed. Since the adaptors have small performance penalty, we provide both GLchan and GLfloat functions for some common formats like RGB, RGBA.

struct gl_texture_format _mesa_texformat_rgba
 GLchan-valued formats.
struct gl_texture_format _mesa_texformat_rgb
struct gl_texture_format _mesa_texformat_alpha
struct gl_texture_format _mesa_texformat_luminance
struct gl_texture_format _mesa_texformat_luminance_alpha
struct gl_texture_format _mesa_texformat_intensity
struct gl_texture_format _mesa_texformat_rgba_float32
 Floating point texture formats.
struct gl_texture_format _mesa_texformat_rgba_float16
struct gl_texture_format _mesa_texformat_rgb_float32
struct gl_texture_format _mesa_texformat_rgb_float16
struct gl_texture_format _mesa_texformat_alpha_float32
struct gl_texture_format _mesa_texformat_alpha_float16
struct gl_texture_format _mesa_texformat_luminance_float32
struct gl_texture_format _mesa_texformat_luminance_float16
struct gl_texture_format _mesa_texformat_luminance_alpha_float32
struct gl_texture_format _mesa_texformat_luminance_alpha_float16
struct gl_texture_format _mesa_texformat_intensity_float32
struct gl_texture_format _mesa_texformat_intensity_float16
struct gl_texture_format _mesa_texformat_dudv8
 Signed fixed point texture formats.
struct gl_texture_format _mesa_texformat_signed_rgba8888
struct gl_texture_format _mesa_texformat_signed_rgba8888_rev
Hardware formats
struct gl_texture_format _mesa_texformat_rgba8888
struct gl_texture_format _mesa_texformat_rgba8888_rev
struct gl_texture_format _mesa_texformat_argb8888
struct gl_texture_format _mesa_texformat_argb8888_rev
struct gl_texture_format _mesa_texformat_rgb888
struct gl_texture_format _mesa_texformat_bgr888
struct gl_texture_format _mesa_texformat_rgb565
struct gl_texture_format _mesa_texformat_rgb565_rev
struct gl_texture_format _mesa_texformat_rgba4444
struct gl_texture_format _mesa_texformat_argb4444
struct gl_texture_format _mesa_texformat_argb4444_rev
struct gl_texture_format _mesa_texformat_rgba5551
struct gl_texture_format _mesa_texformat_argb1555
struct gl_texture_format _mesa_texformat_argb1555_rev
struct gl_texture_format _mesa_texformat_al88
struct gl_texture_format _mesa_texformat_al88_rev
struct gl_texture_format _mesa_texformat_rgb332
struct gl_texture_format _mesa_texformat_a8
struct gl_texture_format _mesa_texformat_l8
struct gl_texture_format _mesa_texformat_i8
struct gl_texture_format _mesa_texformat_ci8
struct gl_texture_format _mesa_texformat_ycbcr
struct gl_texture_format _mesa_texformat_ycbcr_rev
struct gl_texture_format _mesa_texformat_z24_s8
struct gl_texture_format _mesa_texformat_s8_z24
struct gl_texture_format _mesa_texformat_z16
struct gl_texture_format _mesa_texformat_z32
Null format (useful for proxy textures)
struct gl_texture_format _mesa_null_texformat


Define Documentation

#define DIM   3

#define DIM   2

#define DIM   1


Function Documentation

struct gl_texture_format* _mesa_choose_tex_format ( GLcontext ctx,
GLint  internalFormat,
GLenum  format,
GLenum  type 
) [read]

Choose an appropriate texture format given the format, type and internalFormat parameters passed to glTexImage().

Parameters:
ctx the GL context.
internalFormat user's prefered internal texture format.
format incoming image pixel format.
type incoming image data type.
Returns:
a pointer to a gl_texture_format object which describes the choosen texture format, or NULL on failure.
This is called via dd_function_table::ChooseTextureFormat. Hardware drivers will typically override this function with a specialized version.

void _mesa_format_to_type_and_comps ( const struct gl_texture_format format,
GLenum *  datatype,
GLuint *  comps 
)

Return datatype and number of components per texel for the given gl_texture_format.

static void fetch_null_texel ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLchan *  texel 
) [static]

Null texel fetch function.

Have to have this so the FetchTexel function pointer is never NULL.

static void fetch_null_texelf ( const struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
GLfloat *  texel 
) [static]

static void store_null_texel ( struct gl_texture_image texImage,
GLint  i,
GLint  j,
GLint  k,
const void *  texel 
) [static]


Variable Documentation

struct gl_texture_format _mesa_null_texformat

Initial value:

 {
   -1,                                  
   0,                                   
   GL_NONE,                             
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   NULL,                                
   fetch_null_texel,                    
   fetch_null_texel,                    
   fetch_null_texel,                    
   fetch_null_texelf,                   
   fetch_null_texelf,                   
   fetch_null_texelf,                   
   store_null_texel                     
}

struct gl_texture_format _mesa_texformat_a8

Initial value:

 {
   MESA_FORMAT_A8,                      
   GL_ALPHA,                            
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1,                                   
   _mesa_texstore_a8,                   
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_a8,                 
   fetch_texel_2d_f_a8,                 
   fetch_texel_3d_f_a8,                 
   store_texel_a8                       
}

struct gl_texture_format _mesa_texformat_al88

Initial value:

 {
   MESA_FORMAT_AL88,                    
   GL_LUMINANCE_ALPHA,                  
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_al88,                 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_al88,               
   fetch_texel_2d_f_al88,               
   fetch_texel_3d_f_al88,               
   store_texel_al88                     
}

struct gl_texture_format _mesa_texformat_al88_rev

Initial value:

 {
   MESA_FORMAT_AL88_REV,                
   GL_LUMINANCE_ALPHA,                  
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_al88,                 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_al88_rev,           
   fetch_texel_2d_f_al88_rev,           
   fetch_texel_3d_f_al88_rev,           
   store_texel_al88_rev                 
}

struct gl_texture_format _mesa_texformat_alpha

Initial value:

 {
   MESA_FORMAT_ALPHA,                   
   GL_ALPHA,                            
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   CHAN_BITS,                           
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   sizeof(GLchan),                      
   _mesa_texstore_rgba,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_alpha,              
   fetch_texel_2d_f_alpha,              
   fetch_texel_3d_f_alpha,              
   store_texel_alpha                    
}

struct gl_texture_format _mesa_texformat_alpha_float16

Initial value:

 {
   MESA_FORMAT_ALPHA_FLOAT16,           
   GL_ALPHA,                            
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLhalfARB),               
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1 * sizeof(GLhalfARB),               
   _mesa_texstore_rgba_float16, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_alpha_f16,          
   fetch_texel_2d_f_alpha_f16,          
   fetch_texel_3d_f_alpha_f16,          
   store_texel_alpha_f16                
}

struct gl_texture_format _mesa_texformat_alpha_float32

Initial value:

 {
   MESA_FORMAT_ALPHA_FLOAT32,           
   GL_ALPHA,                            
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLfloat),                 
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1 * sizeof(GLfloat),                 
   _mesa_texstore_rgba_float32, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_alpha_f32,          
   fetch_texel_2d_f_alpha_f32,          
   fetch_texel_3d_f_alpha_f32,          
   store_texel_alpha_f32                
}

struct gl_texture_format _mesa_texformat_argb1555

Initial value:

 {
   MESA_FORMAT_ARGB1555,                
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   5,                                   
   5,                                   
   5,                                   
   1,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_argb1555,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_argb1555,           
   fetch_texel_2d_f_argb1555,           
   fetch_texel_3d_f_argb1555,           
   store_texel_argb1555                 
}

struct gl_texture_format _mesa_texformat_argb1555_rev

Initial value:

 {
   MESA_FORMAT_ARGB1555_REV,            
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   5,                                   
   5,                                   
   5,                                   
   1,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_argb1555,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_argb1555_rev,       
   fetch_texel_2d_f_argb1555_rev,       
   fetch_texel_3d_f_argb1555_rev,       
   store_texel_argb1555_rev             
}

struct gl_texture_format _mesa_texformat_argb4444

Initial value:

 {
   MESA_FORMAT_ARGB4444,                
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                                   
   4,                                   
   4,                                   
   4,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_argb4444,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_argb4444,           
   fetch_texel_2d_f_argb4444,           
   fetch_texel_3d_f_argb4444,           
   store_texel_argb4444                 
}

struct gl_texture_format _mesa_texformat_argb4444_rev

Initial value:

 {
   MESA_FORMAT_ARGB4444_REV,            
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                                   
   4,                                   
   4,                                   
   4,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_argb4444,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_argb4444_rev,       
   fetch_texel_2d_f_argb4444_rev,       
   fetch_texel_3d_f_argb4444_rev,       
   store_texel_argb4444_rev             
}

struct gl_texture_format _mesa_texformat_argb8888

Initial value:

 {
   MESA_FORMAT_ARGB8888,                
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   8,                                   
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4,                                   
   _mesa_texstore_argb8888,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_argb8888,           
   fetch_texel_2d_f_argb8888,           
   fetch_texel_3d_f_argb8888,           
   store_texel_argb8888                 
}

struct gl_texture_format _mesa_texformat_argb8888_rev

Initial value:

 {
   MESA_FORMAT_ARGB8888_REV,            
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   8,                                   
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4,                                   
   _mesa_texstore_argb8888,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_argb8888_rev,       
   fetch_texel_2d_f_argb8888_rev,       
   fetch_texel_3d_f_argb8888_rev,       
   store_texel_argb8888_rev             
}

struct gl_texture_format _mesa_texformat_bgr888

Initial value:

 {
   MESA_FORMAT_BGR888,                  
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   3,                                   
   _mesa_texstore_bgr888,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_bgr888,             
   fetch_texel_2d_f_bgr888,             
   fetch_texel_3d_f_bgr888,             
   store_texel_bgr888                   
}

struct gl_texture_format _mesa_texformat_ci8

Initial value:

 {
   MESA_FORMAT_CI8,                     
   GL_COLOR_INDEX,                      
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8,                                   
   0,                                   
   0,                                   
   1,                                   
   _mesa_texstore_ci8,                  
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_ci8,                
   fetch_texel_2d_f_ci8,                
   fetch_texel_3d_f_ci8,                
   store_texel_ci8                      
}

struct gl_texture_format _mesa_texformat_dudv8

Initial value:

 {
   MESA_FORMAT_DUDV8,                   
   GL_DUDV_ATI,                         
   GL_SIGNED_NORMALIZED,                
   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_dudv8,                
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_dudv8,                
   fetch_texel_2d_dudv8,                
   fetch_texel_3d_dudv8,                
   NULL                                 
}
Signed fixed point texture formats.

struct gl_texture_format _mesa_texformat_i8

Initial value:

 {
   MESA_FORMAT_I8,                      
   GL_INTENSITY,                        
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   1,                                   
   _mesa_texstore_a8,           
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_i8,                 
   fetch_texel_2d_f_i8,                 
   fetch_texel_3d_f_i8,                 
   store_texel_i8                       
}

struct gl_texture_format _mesa_texformat_intensity

Initial value:

 {
   MESA_FORMAT_INTENSITY,               
   GL_INTENSITY,                        
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   CHAN_BITS,                           
   0,                                   
   0,                                   
   0,                                   
   sizeof(GLchan),                      
   _mesa_texstore_rgba,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_intensity,          
   fetch_texel_2d_f_intensity,          
   fetch_texel_3d_f_intensity,          
   store_texel_intensity                
}

struct gl_texture_format _mesa_texformat_intensity_float16

Initial value:

 {
   MESA_FORMAT_INTENSITY_FLOAT16,       
   GL_INTENSITY,                        
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLhalfARB),               
   0,                                   
   0,                                   
   0,                                   
   1 * sizeof(GLhalfARB),               
   _mesa_texstore_rgba_float16, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_intensity_f16,      
   fetch_texel_2d_f_intensity_f16,      
   fetch_texel_3d_f_intensity_f16,      
   store_texel_intensity_f16            
}

struct gl_texture_format _mesa_texformat_intensity_float32

Initial value:

 {
   MESA_FORMAT_INTENSITY_FLOAT32,       
   GL_INTENSITY,                        
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLfloat),                 
   0,                                   
   0,                                   
   0,                                   
   1 * sizeof(GLfloat),                 
   _mesa_texstore_rgba_float32, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_intensity_f32,      
   fetch_texel_2d_f_intensity_f32,      
   fetch_texel_3d_f_intensity_f32,      
   store_texel_intensity_f32            
}

struct gl_texture_format _mesa_texformat_l8

Initial value:

 {
   MESA_FORMAT_L8,                      
   GL_LUMINANCE,                        
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1,                                   
   _mesa_texstore_a8,           
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_l8,                 
   fetch_texel_2d_f_l8,                 
   fetch_texel_3d_f_l8,                 
   store_texel_l8                       
}

struct gl_texture_format _mesa_texformat_luminance

Initial value:

 {
   MESA_FORMAT_LUMINANCE,               
   GL_LUMINANCE,                        
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   CHAN_BITS,                           
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   sizeof(GLchan),                      
   _mesa_texstore_rgba,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_luminance,          
   fetch_texel_2d_f_luminance,          
   fetch_texel_3d_f_luminance,          
   store_texel_luminance                
}

struct gl_texture_format _mesa_texformat_luminance_alpha

Initial value:

 {
   MESA_FORMAT_LUMINANCE_ALPHA,         
   GL_LUMINANCE_ALPHA,                  
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   CHAN_BITS,                           
   CHAN_BITS,                           
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2 * sizeof(GLchan),                  
   _mesa_texstore_rgba,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_luminance_alpha,    
   fetch_texel_2d_f_luminance_alpha,    
   fetch_texel_3d_f_luminance_alpha,    
   store_texel_luminance_alpha          
}

struct gl_texture_format _mesa_texformat_luminance_alpha_float16

Initial value:

 {
   MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, 
   GL_LUMINANCE_ALPHA,                  
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLhalfARB),               
   8 * sizeof(GLhalfARB),               
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2 * sizeof(GLhalfARB),               
   _mesa_texstore_rgba_float16,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_luminance_alpha_f16,
   fetch_texel_2d_f_luminance_alpha_f16,
   fetch_texel_3d_f_luminance_alpha_f16,
   store_texel_luminance_alpha_f16      
}

struct gl_texture_format _mesa_texformat_luminance_alpha_float32

Initial value:

 {
   MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, 
   GL_LUMINANCE_ALPHA,                  
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLfloat),                 
   8 * sizeof(GLfloat),                 
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2 * sizeof(GLfloat),                 
   _mesa_texstore_rgba_float32,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_luminance_alpha_f32,
   fetch_texel_2d_f_luminance_alpha_f32,
   fetch_texel_3d_f_luminance_alpha_f32,
   store_texel_luminance_alpha_f32      
}

struct gl_texture_format _mesa_texformat_luminance_float16

Initial value:

 {
   MESA_FORMAT_LUMINANCE_FLOAT16,       
   GL_LUMINANCE,                        
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLhalfARB),               
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1 * sizeof(GLhalfARB),               
   _mesa_texstore_rgba_float16, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_luminance_f16,      
   fetch_texel_2d_f_luminance_f16,      
   fetch_texel_3d_f_luminance_f16,      
   store_texel_luminance_f16            
}

struct gl_texture_format _mesa_texformat_luminance_float32

Initial value:

 {
   MESA_FORMAT_LUMINANCE_FLOAT32,       
   GL_LUMINANCE,                        
   GL_FLOAT,                            
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   8 * sizeof(GLfloat),                 
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1 * sizeof(GLfloat),                 
   _mesa_texstore_rgba_float32, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_luminance_f32,      
   fetch_texel_2d_f_luminance_f32,      
   fetch_texel_3d_f_luminance_f32,      
   store_texel_luminance_f32            
}

struct gl_texture_format _mesa_texformat_rgb

Initial value:

 {
   MESA_FORMAT_RGB,                     
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   CHAN_BITS,                           
   CHAN_BITS,                           
   CHAN_BITS,                           
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   3 * sizeof(GLchan),                  
   _mesa_texstore_rgba,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb,                
   fetch_texel_2d_f_rgb,                
   fetch_texel_3d_f_rgb,                
   store_texel_rgb                      
}

struct gl_texture_format _mesa_texformat_rgb332

Initial value:

 {
   MESA_FORMAT_RGB332,                  
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   3,                                   
   3,                                   
   2,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   1,                                   
   _mesa_texstore_rgb332,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb332,             
   fetch_texel_2d_f_rgb332,             
   fetch_texel_3d_f_rgb332,             
   store_texel_rgb332                   
}

struct gl_texture_format _mesa_texformat_rgb565

Initial value:

 {
   MESA_FORMAT_RGB565,                  
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   5,                                   
   6,                                   
   5,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_rgb565,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb565,             
   fetch_texel_2d_f_rgb565,             
   fetch_texel_3d_f_rgb565,             
   store_texel_rgb565                   
}

struct gl_texture_format _mesa_texformat_rgb565_rev

Initial value:

 {
   MESA_FORMAT_RGB565_REV,              
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   5,                                   
   6,                                   
   5,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_rgb565,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb565_rev,         
   fetch_texel_2d_f_rgb565_rev,         
   fetch_texel_3d_f_rgb565_rev,         
   store_texel_rgb565_rev               
}

struct gl_texture_format _mesa_texformat_rgb888

Initial value:

 {
   MESA_FORMAT_RGB888,                  
   GL_RGB,                              
   GL_UNSIGNED_NORMALIZED_ARB,          
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   3,                                   
   _mesa_texstore_rgb888,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb888,             
   fetch_texel_2d_f_rgb888,             
   fetch_texel_3d_f_rgb888,             
   store_texel_rgb888                   
}

struct gl_texture_format _mesa_texformat_rgb_float16

Initial value:

 {
   MESA_FORMAT_RGB_FLOAT16,             
   GL_RGB,                              
   GL_FLOAT,                            
   8 * sizeof(GLhalfARB),               
   8 * sizeof(GLhalfARB),               
   8 * sizeof(GLhalfARB),               
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   3 * sizeof(GLhalfARB),               
   _mesa_texstore_rgba_float16, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb_f16,            
   fetch_texel_2d_f_rgb_f16,            
   fetch_texel_3d_f_rgb_f16,            
   store_texel_rgb_f16                  
}

struct gl_texture_format _mesa_texformat_rgb_float32

Initial value:

 {
   MESA_FORMAT_RGB_FLOAT32,             
   GL_RGB,                              
   GL_FLOAT,                            
   8 * sizeof(GLfloat),                 
   8 * sizeof(GLfloat),                 
   8 * sizeof(GLfloat),                 
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   3 * sizeof(GLfloat),                 
   _mesa_texstore_rgba_float32, 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgb_f32,            
   fetch_texel_2d_f_rgb_f32,            
   fetch_texel_3d_f_rgb_f32,            
   store_texel_rgb_f32                  
}

struct gl_texture_format _mesa_texformat_rgba

Initial value:

 {
   MESA_FORMAT_RGBA,                    
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   CHAN_BITS,                           
   CHAN_BITS,                           
   CHAN_BITS,                           
   CHAN_BITS,                           
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4 * sizeof(GLchan),                  
   _mesa_texstore_rgba,                 
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba,               
   fetch_texel_2d_f_rgba,               
   fetch_texel_3d_f_rgba,               
   store_texel_rgba                     
}
GLchan-valued formats.

struct gl_texture_format _mesa_texformat_rgba4444

Initial value:

 {
   MESA_FORMAT_RGBA4444,                
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   4,                                   
   4,                                   
   4,                                   
   4,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_rgba4444,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba4444,           
   fetch_texel_2d_f_rgba4444,           
   fetch_texel_3d_f_rgba4444,           
   store_texel_rgba4444                 
}

struct gl_texture_format _mesa_texformat_rgba5551

Initial value:

 {
   MESA_FORMAT_RGBA5551,                
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   5,                                   
   5,                                   
   5,                                   
   1,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_rgba5551,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba5551,           
   fetch_texel_2d_f_rgba5551,           
   fetch_texel_3d_f_rgba5551,           
   store_texel_rgba5551                 
}

struct gl_texture_format _mesa_texformat_rgba8888

Initial value:

 {
   MESA_FORMAT_RGBA8888,                
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   8,                                   
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4,                                   
   _mesa_texstore_rgba8888,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba8888,           
   fetch_texel_2d_f_rgba8888,           
   fetch_texel_3d_f_rgba8888,           
   store_texel_rgba8888                 
}

struct gl_texture_format _mesa_texformat_rgba8888_rev

Initial value:

 {
   MESA_FORMAT_RGBA8888_REV,            
   GL_RGBA,                             
   GL_UNSIGNED_NORMALIZED_ARB,          
   8,                                   
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4,                                   
   _mesa_texstore_rgba8888,             
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba8888_rev,       
   fetch_texel_2d_f_rgba8888_rev,       
   fetch_texel_3d_f_rgba8888_rev,       
   store_texel_rgba8888_rev             
}

struct gl_texture_format _mesa_texformat_rgba_float16

Initial value:

 {
   MESA_FORMAT_RGBA_FLOAT16,            
   GL_RGBA,                             
   GL_FLOAT,                            
   8 * sizeof(GLhalfARB),               
   8 * sizeof(GLhalfARB),               
   8 * sizeof(GLhalfARB),               
   8 * sizeof(GLhalfARB),               
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4 * sizeof(GLhalfARB),               
   _mesa_texstore_rgba_float16,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba_f16,           
   fetch_texel_2d_f_rgba_f16,           
   fetch_texel_3d_f_rgba_f16,           
   store_texel_rgba_f16                 
}

struct gl_texture_format _mesa_texformat_rgba_float32

Initial value:

 {
   MESA_FORMAT_RGBA_FLOAT32,            
   GL_RGBA,                             
   GL_FLOAT,                            
   8 * sizeof(GLfloat),                 
   8 * sizeof(GLfloat),                 
   8 * sizeof(GLfloat),                 
   8 * sizeof(GLfloat),                 
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4 * sizeof(GLfloat),                 
   _mesa_texstore_rgba_float32,         
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_rgba_f32,           
   fetch_texel_2d_f_rgba_f32,           
   fetch_texel_3d_f_rgba_f32,           
   store_texel_rgba_f32                 
}
Floating point texture formats.

struct gl_texture_format _mesa_texformat_s8_z24

Initial value:

 {
   MESA_FORMAT_S8_Z24,                  
   GL_DEPTH_STENCIL_EXT,                
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   24,                                  
   8,                                   
   4,                                   
   _mesa_texstore_s8_z24,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_s8_z24,             
   fetch_texel_2d_f_s8_z24,             
   fetch_texel_3d_f_s8_z24,             
   store_texel_s8_z24                   
}

struct gl_texture_format _mesa_texformat_signed_rgba8888

Initial value:

 {
   MESA_FORMAT_SIGNED_RGBA8888,         
   GL_RGBA,                             
   GL_SIGNED_NORMALIZED,                
   8,                                   
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4,                                   
   _mesa_texstore_signed_rgba8888,      
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_signed_rgba8888,      
   fetch_texel_2d_signed_rgba8888,      
   fetch_texel_3d_signed_rgba8888,      
   store_texel_signed_rgba8888          
}

struct gl_texture_format _mesa_texformat_signed_rgba8888_rev

Initial value:

 {
   MESA_FORMAT_SIGNED_RGBA8888_REV,     
   GL_RGBA,                             
   GL_SIGNED_NORMALIZED,                
   8,                                   
   8,                                   
   8,                                   
   8,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   4,                                   
   _mesa_texstore_signed_rgba8888,      
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_signed_rgba8888_rev,  
   fetch_texel_2d_signed_rgba8888_rev,  
   fetch_texel_3d_signed_rgba8888_rev,  
   store_texel_signed_rgba8888_rev              
}

struct gl_texture_format _mesa_texformat_ycbcr

Initial value:

 {
   MESA_FORMAT_YCBCR,                   
   GL_YCBCR_MESA,                       
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_ycbcr,                
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_ycbcr,              
   fetch_texel_2d_f_ycbcr,              
   fetch_texel_3d_f_ycbcr,              
   store_texel_ycbcr                    
}

struct gl_texture_format _mesa_texformat_ycbcr_rev

Initial value:

 {
   MESA_FORMAT_YCBCR_REV,               
   GL_YCBCR_MESA,                       
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   2,                                   
   _mesa_texstore_ycbcr,                
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_ycbcr_rev,          
   fetch_texel_2d_f_ycbcr_rev,          
   fetch_texel_3d_f_ycbcr_rev,          
   store_texel_ycbcr_rev                
}

struct gl_texture_format _mesa_texformat_z16

Initial value:

 {
   MESA_FORMAT_Z16,                     
   GL_DEPTH_COMPONENT,                  
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   sizeof(GLushort) * 8,                
   0,                                   
   sizeof(GLushort),                    
   _mesa_texstore_z16,                  
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_z16,                
   fetch_texel_2d_f_z16,                
   fetch_texel_3d_f_z16,                
   store_texel_z16                      
}

struct gl_texture_format _mesa_texformat_z24_s8

Initial value:

 {
   MESA_FORMAT_Z24_S8,                  
   GL_DEPTH_STENCIL_EXT,                
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   24,                                  
   8,                                   
   4,                                   
   _mesa_texstore_z24_s8,               
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_z24_s8,             
   fetch_texel_2d_f_z24_s8,             
   fetch_texel_3d_f_z24_s8,             
   store_texel_z24_s8                   
}

struct gl_texture_format _mesa_texformat_z32

Initial value:

 {
   MESA_FORMAT_Z32,                     
   GL_DEPTH_COMPONENT,                  
   GL_UNSIGNED_NORMALIZED_ARB,          
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   0,                                   
   sizeof(GLuint) * 8,                  
   0,                                   
   sizeof(GLuint),                      
   _mesa_texstore_z32,                  
   NULL,                                
   NULL,                                
   NULL,                                
   fetch_texel_1d_f_z32,                
   fetch_texel_2d_f_z32,                
   fetch_texel_3d_f_z32,                
   store_texel_z32                      
}


Generated on Sun Sep 27 06:47:46 2009 for Mesa Main by  doxygen 1.5.4