diff options
Diffstat (limited to 'xc/extras/Mesa/src/texformat.h')
-rw-r--r-- | xc/extras/Mesa/src/texformat.h | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/xc/extras/Mesa/src/texformat.h b/xc/extras/Mesa/src/texformat.h index 72b473cdf..1ea33090f 100644 --- a/xc/extras/Mesa/src/texformat.h +++ b/xc/extras/Mesa/src/texformat.h @@ -1,9 +1,9 @@ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.1 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,7 +23,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Author: - * Gareth Hughes <gareth@valinux.com> + * Gareth Hughes */ #ifndef TEXFORMAT_H @@ -32,17 +32,20 @@ #include "mtypes.h" -/* The Mesa internal texture image types. These will be set to their - * default value, but may be changed by drivers as required. +/* + * The Mesa internal texture image types. + * All texture images must be stored in one of these formats. */ enum _format { /* Hardware-friendly formats. Drivers can override the default * formats and convert texture images to one of these as required. + * The driver's ChooseTextureFormat() function will choose one of + * these formats. * These formats are all little endian, as shown below. They will be * most useful for x86-based PC graphics card drivers. * * NOTE: In the default case, some of these formats will be - * duplicates of the default formats listed above. However, these + * duplicates of the generic formats listed below. However, these * formats guarantee their internal component sizes, while GLchan may * vary betwen GLubyte, GLushort and GLfloat. */ @@ -60,6 +63,23 @@ enum _format { MESA_FORMAT_L8, /* LLLL LLLL */ MESA_FORMAT_I8, /* IIII IIII */ MESA_FORMAT_CI8, /* CCCC CCCC */ + MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */ + MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */ + +#if 0 + /* upcoming little-endian formats: */ + + /* msb <------ TEXEL BITS -----------> lsb */ + /* ---- ---- ---- ---- ---- ---- ---- ---- */ + MESA_FORMAT_ABGR8888, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */ + MESA_FORMAT_BGRA8888, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */ + MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */ + MESA_FORMAT_BGR565, /* BBBB BGGG GGGR RRRR */ + MESA_FORMAT_BGRA4444, /* BBBB GGGG RRRR AAAA */ + MESA_FORMAT_BGRA5551, /* BBBB BGGG GGRR RRRA */ + MESA_FORMAT_LA88, /* LLLL LLLL AAAA AAAA */ + MESA_FORMAT_BGR233, /* BBGG GRRR */ +#endif /* Generic GLchan-based formats. These are the default formats used * by the software rasterizer and, unless the driver overrides the @@ -69,7 +89,7 @@ enum _format { * * NOTE: Because these are based on the GLchan datatype, one cannot * assume 8 bits per channel with these formats. If you require - * GLubyte per channel, use one of the hardware formats above. + * GLubyte channels, use one of the hardware formats above. */ MESA_FORMAT_RGBA, MESA_FORMAT_RGB, @@ -92,10 +112,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, extern GLint _mesa_base_compressed_texformat(GLcontext *ctx, GLint intFormat); -extern GLint -_mesa_compressed_texture_size(GLcontext *ctx, - const struct gl_texture_image *texImage); - /* The default formats, GLchan per component: */ @@ -122,6 +138,8 @@ extern const struct gl_texture_format _mesa_texformat_a8; extern const struct gl_texture_format _mesa_texformat_l8; extern const struct gl_texture_format _mesa_texformat_i8; extern const struct gl_texture_format _mesa_texformat_ci8; +extern const struct gl_texture_format _mesa_texformat_ycbcr; +extern const struct gl_texture_format _mesa_texformat_ycbcr_rev; /* The null format: */ |