p_format.h File Reference

Include dependency graph for p_format.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pipe_format_block
 Describe accurately the pixel format. More...

Defines

#define PIPE_FORMAT_LAYOUT_RGBAZS   0
 The pipe_format enum is a 32-bit wide bitfield that encodes all the information needed to uniquely describe a pixel format.
#define PIPE_FORMAT_LAYOUT_YCBCR   1
#define PIPE_FORMAT_LAYOUT_DXT   2
 XXX temporary?
#define PIPE_FORMAT_LAYOUT_MIXED   3
#define PIPE_FORMAT_COMP_R   0
 RGBAZS Format Layout.
#define PIPE_FORMAT_COMP_G   1
#define PIPE_FORMAT_COMP_B   2
#define PIPE_FORMAT_COMP_A   3
#define PIPE_FORMAT_COMP_0   4
#define PIPE_FORMAT_COMP_1   5
#define PIPE_FORMAT_COMP_Z   6
#define PIPE_FORMAT_COMP_S   7
#define PIPE_FORMAT_TYPE_UNKNOWN   0
 Format types for RGBAZS layout.
#define PIPE_FORMAT_TYPE_FLOAT   1
 16/32/64-bit/channel formats
#define PIPE_FORMAT_TYPE_UNORM   2
 uints, normalized to [0,1]
#define PIPE_FORMAT_TYPE_SNORM   3
 ints, normalized to [-1,1]
#define PIPE_FORMAT_TYPE_USCALED   4
 uints, not normalized
#define PIPE_FORMAT_TYPE_SSCALED   5
 ints, not normalized
#define PIPE_FORMAT_TYPE_SRGB   6
 sRGB colorspace
#define PIPE_FORMAT_TYPE_FIXED   7
 16.16 fixed point
#define pf_swizzle_x(f)   pf_get(f, 2, 0x7)
 PIPE_FORMAT_COMP_.
#define pf_swizzle_y(f)   pf_get(f, 5, 0x7)
 PIPE_FORMAT_COMP_.
#define pf_swizzle_z(f)   pf_get(f, 8, 0x7)
 PIPE_FORMAT_COMP_.
#define pf_swizzle_w(f)   pf_get(f, 11, 0x7)
 PIPE_FORMAT_COMP_.
#define pf_swizzle_xyzw(f, i)   pf_get(f, 2+((i)*3), 0x7)
#define pf_size_x(f)   pf_get(f, 14, 0x7)
 Size of X.
#define pf_size_y(f)   pf_get(f, 17, 0x7)
 Size of Y.
#define pf_size_z(f)   pf_get(f, 20, 0x7)
 Size of Z.
#define pf_size_w(f)   pf_get(f, 23, 0x7)
 Size of W.
#define pf_size_xyzw(f, i)   pf_get(f, 14+((i)*3), 0x7)
#define pf_exp2(f)   pf_get(f, 26, 0x7)
 Scale size by 2 ^ exp2.
#define pf_type(f)   pf_get(f, 29, 0x7)
 PIPE_FORMAT_TYPE_.
#define _PIPE_FORMAT_RGBAZS(SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, EXP2, TYPE)
 Helper macro to encode the above structure into a 32-bit value.
#define _PIPE_FORMAT_SWZ(SWZX, SWZY, SWZZ, SWZW)   (((SWZX) << 0) | ((SWZY) << 3) | ((SWZZ) << 6) | ((SWZW) << 9))
 Helper macro to encode the swizzle part of the structure above.
#define _PIPE_FORMAT_RGBAZS_1(SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE)   _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 0, TYPE )
 Shorthand macro for RGBAZS layout with component sizes in 1-bit units.
#define _PIPE_FORMAT_RGBAZS_2(SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE)   _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 1, TYPE )
 Shorthand macro for RGBAZS layout with component sizes in 2-bit units.
#define _PIPE_FORMAT_RGBAZS_8(SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE)   _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 3, TYPE )
 Shorthand macro for RGBAZS layout with component sizes in 8-bit units.
#define _PIPE_FORMAT_RGBAZS_64(SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE)   _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 6, TYPE )
 Shorthand macro for RGBAZS layout with component sizes in 64-bit units.
#define pf_mixed_sign_x(f)   pf_get( f, 26, 0x1 )
#define pf_mixed_sign_y(f)   pf_get( f, 27, 0x1 )
#define pf_mixed_sign_z(f)   pf_get( f, 28, 0x1 )
#define pf_mixed_sign_w(f)   pf_get( f, 29, 0x1 )
#define pf_mixed_sign_xyzw(f, i)   pf_get( f, 26 + (i), 0x1 )
#define pf_mixed_normalized(f)   pf_get( f, 30, 0x1 )
#define pf_mixed_scale8(f)   pf_get( f, 31, 0x1 )
#define _PIPE_FORMAT_MIXED(SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, SIGNX, SIGNY, SIGNZ, SIGNW, NORMALIZED, SCALE8)
 Helper macro to encode the above structure into a 32-bit value.
#define _PIPE_FORMAT_R001   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )
 Shorthand macro for common format swizzles.
#define _PIPE_FORMAT_RG01   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )
#define _PIPE_FORMAT_RGB1   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_1 )
#define _PIPE_FORMAT_RGBA   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_A )
#define _PIPE_FORMAT_ARGB   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )
#define _PIPE_FORMAT_ABGR   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )
#define _PIPE_FORMAT_BGRA   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_A )
#define _PIPE_FORMAT_1RGB   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )
#define _PIPE_FORMAT_1BGR   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )
#define _PIPE_FORMAT_BGR1   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )
#define _PIPE_FORMAT_0000   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
#define _PIPE_FORMAT_000R   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_R )
#define _PIPE_FORMAT_RRR1   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )
#define _PIPE_FORMAT_RRRR   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R )
#define _PIPE_FORMAT_RRRG   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G )
#define _PIPE_FORMAT_Z000   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
#define _PIPE_FORMAT_0Z00   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
#define _PIPE_FORMAT_SZ00   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
#define _PIPE_FORMAT_ZS00   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
#define _PIPE_FORMAT_S000   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )
#define _PIPE_FORMAT_YCBCR(REV)
 Helper macro to encode the above structure into a 32-bit value.
#define _PIPE_FORMAT_DXT(LEVEL, RSIZE, GSIZE, BSIZE, ASIZE)
 Compresssed format layouts (this will probably change).

Typedefs

typedef uint pipe_format_rgbazs_t
 Because the destination vector is assumed to be RGBA FLOAT, we need to know how to swizzle and expand components from the source vector.
typedef uint pipe_format_mixed_t
typedef uint pipe_format_ycbcr_t
 YCBCR Format Layout.

Enumerations

enum  pipe_format {
  PIPE_FORMAT_NONE = ( ( 0 << 0) | (( ((( 4 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 0 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 0 ) << 26) | (( 0 ) << 29) ), PIPE_FORMAT_A8R8G8B8_UNORM = ( ( 0 << 0) | (( ((( 3 ) << 0) | (( 0 ) << 3) | (( 1 ) << 6) | (( 2 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_X8R8G8B8_UNORM = ( ( 0 << 0) | (( ((( 5 ) << 0) | (( 0 ) << 3) | (( 1 ) << 6) | (( 2 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_B8G8R8A8_UNORM = ( ( 0 << 0) | (( ((( 2 ) << 0) | (( 1 ) << 3) | (( 0 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_B8G8R8X8_UNORM = ( ( 0 << 0) | (( ((( 2 ) << 0) | (( 1 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_A1R5G5B5_UNORM = ( ( 0 << 0) | (( ((( 3 ) << 0) | (( 0 ) << 3) | (( 1 ) << 6) | (( 2 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 5 ) << 17) | (( 5 ) << 20) | (( 5 ) << 23) | (( 0 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_A4R4G4B4_UNORM = ( ( 0 << 0) | (( ((( 3 ) << 0) | (( 0 ) << 3) | (( 1 ) << 6) | (( 2 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 0 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R5G6B5_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 5 ) << 14) | (( 6 ) << 17) | (( 5 ) << 20) | (( 0 ) << 23) | (( 0 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_A2B10G10R10_UNORM = ( ( 0 << 0) | (( ((( 3 ) << 0) | (( 2 ) << 3) | (( 1 ) << 6) | (( 0 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 5 ) << 17) | (( 5 ) << 20) | (( 5 ) << 23) | (( 1 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_L8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 0 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_A8_UNORM = ( ( 0 << 0) | (( ((( 4 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 0 ) << 9)) ) << 2) | (( 0 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_I8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 0 ) << 3) | (( 0 ) << 6) | (( 0 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_A8L8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 0 ) << 3) | (( 0 ) << 6) | (( 1 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_L16_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 0 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_YCBCR = ( ( 1 << 0) | (( 0 ) << 2) ), PIPE_FORMAT_YCBCR_REV = ( ( 1 << 0) | (( 1 ) << 2) ),
  PIPE_FORMAT_Z16_UNORM = ( ( 0 << 0) | (( ((( 6 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_Z32_UNORM = ( ( 0 << 0) | (( ((( 6 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_Z32_FLOAT = ( ( 0 << 0) | (( ((( 6 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_S8Z24_UNORM = ( ( 0 << 0) | (( ((( 7 ) << 0) | (( 6 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 3 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_Z24S8_UNORM = ( ( 0 << 0) | (( ((( 6 ) << 0) | (( 7 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 3 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_X8Z24_UNORM = ( ( 0 << 0) | (( ((( 4 ) << 0) | (( 6 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 3 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_Z24X8_UNORM = ( ( 0 << 0) | (( ((( 6 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 3 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_S8_UNORM = ( ( 0 << 0) | (( ((( 7 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 4 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_R64_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 6 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_R64G64_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 6 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_R64G64B64_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 6 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_R64G64B64A64_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 6 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ),
  PIPE_FORMAT_R32_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_R32G32_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_R32G32B32_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ), PIPE_FORMAT_R32G32B32A32_FLOAT = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 3 ) << 26) | (( 1 /**< 16/32/64-bit/channel formats */ ) << 29) ),
  PIPE_FORMAT_R32_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R32G32_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R32G32B32_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R32G32B32A32_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_R32_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32G32_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32G32B32_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32G32B32A32_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ),
  PIPE_FORMAT_R32_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R32G32_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R32G32B32_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R32G32B32A32_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1,
  PIPE_FORMAT_R32_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32G32_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32G32B32_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32G32B32A32_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ),
  PIPE_FORMAT_R16_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R16G16_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R16G16B16_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R16G16B16A16_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 2 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_R16_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R16G16_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R16G16B16_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R16G16B16A16_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 2 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ),
  PIPE_FORMAT_R16_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R16G16_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R16G16B16_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R16G16B16A16_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 2 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1,
  PIPE_FORMAT_R16_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R16G16_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R16G16B16_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R16G16B16A16_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 2 ) << 14) | (( 2 ) << 17) | (( 2 ) << 20) | (( 2 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ),
  PIPE_FORMAT_R8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R8G8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R8G8B8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R8G8B8A8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0,
  PIPE_FORMAT_R8G8B8X8_UNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 2 /**< uints ) << 29) ) normalized to [0, PIPE_FORMAT_R8_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8G8_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8G8B8_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ),
  PIPE_FORMAT_R8G8B8A8_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8G8B8X8_USCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 4 /**< uints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R8G8_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1,
  PIPE_FORMAT_R8G8B8_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R8G8B8A8_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R8G8B8X8_SNORM = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_B6G5R5_SNORM = ( ( 0 << 0) | (( ((( 2 ) << 0) | (( 1 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 6 ) << 14) | (( 5 ) << 17) | (( 5 ) << 20) | (( 0 ) << 23) | (( 0 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1,
  PIPE_FORMAT_A8B8G8R8_SNORM = ( ( 0 << 0) | (( ((( 2 ) << 0) | (( 1 ) << 3) | (( 0 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_X8B8G8R8_SNORM = ( ( 0 << 0) | (( ((( 2 ) << 0) | (( 1 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 3 /**< ints ) << 29) ) normalized to [-1, PIPE_FORMAT_R8_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8G8_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ),
  PIPE_FORMAT_R8G8B8_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8G8B8A8_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R8G8B8X8_SSCALED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 5 /**< ints ) << 29) ) not normalized */ ), PIPE_FORMAT_R32_FIXED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 4 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 0 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 7 /**< 16.16 fixed point */ ) << 29) ),
  PIPE_FORMAT_R32G32_FIXED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 4 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 0 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 7 /**< 16.16 fixed point */ ) << 29) ), PIPE_FORMAT_R32G32B32_FIXED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 7 /**< 16.16 fixed point */ ) << 29) ), PIPE_FORMAT_R32G32B32A32_FIXED = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 4 ) << 14) | (( 4 ) << 17) | (( 4 ) << 20) | (( 4 ) << 23) | (( 3 ) << 26) | (( 7 /**< 16.16 fixed point */ ) << 29) ), PIPE_FORMAT_L8_SRGB = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 0 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 6 /**< sRGB colorspace */ ) << 29) ),
  PIPE_FORMAT_A8_L8_SRGB = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 0 ) << 3) | (( 0 ) << 6) | (( 1 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 6 /**< sRGB colorspace */ ) << 29) ), PIPE_FORMAT_R8G8B8_SRGB = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 0 ) << 23) | (( 3 ) << 26) | (( 6 /**< sRGB colorspace */ ) << 29) ), PIPE_FORMAT_R8G8B8A8_SRGB = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 3 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 6 /**< sRGB colorspace */ ) << 29) ), PIPE_FORMAT_R8G8B8X8_SRGB = ( ( 0 << 0) | (( ((( 0 ) << 0) | (( 1 ) << 3) | (( 2 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 3 ) << 26) | (( 6 /**< sRGB colorspace */ ) << 29) ),
  PIPE_FORMAT_X8UB8UG8SR8S_NORM = ( ( 3 << 0) | (( ((( 5 ) << 0) | (( 2 ) << 3) | (( 1 ) << 6) | (( 0 ) << 9)) ) << 2) | (( 1 ) << 14) | (( 1 ) << 17) | (( 1 ) << 20) | (( 1 ) << 23) | (( 0 ) << 26) | (( 0 ) << 27) | (( 1 ) << 28) | (( 1 ) << 29) | (( 1 ) << 30) | (( 1 ) << 31) ), PIPE_FORMAT_B6UG5SR5S_NORM = ( ( 3 << 0) | (( ((( 2 ) << 0) | (( 1 ) << 3) | (( 0 ) << 6) | (( 5 ) << 9)) ) << 2) | (( 6 ) << 14) | (( 5 ) << 17) | (( 5 ) << 20) | (( 0 ) << 23) | (( 0 ) << 26) | (( 1 ) << 27) | (( 1 ) << 28) | (( 0 ) << 29) | (( 1 ) << 30) | (( 0 ) << 31) ), PIPE_FORMAT_DXT1_RGB = (( 2 /**< XXX temporary? */ << 0) | (( 1 ) << 2) | (( 8 ) << 5) | (( 8 ) << 8) | (( 8 ) << 11) | (( 0 ) << 14) ), PIPE_FORMAT_DXT1_RGBA = (( 2 /**< XXX temporary? */ << 0) | (( 1 ) << 2) | (( 8 ) << 5) | (( 8 ) << 8) | (( 8 ) << 11) | (( 8 ) << 14) ),
  PIPE_FORMAT_DXT3_RGBA = (( 2 /**< XXX temporary? */ << 0) | (( 3 ) << 2) | (( 8 ) << 5) | (( 8 ) << 8) | (( 8 ) << 11) | (( 8 ) << 14) ), PIPE_FORMAT_DXT5_RGBA = (( 2 /**< XXX temporary? */ << 0) | (( 5 ) << 2) | (( 8 ) << 5) | (( 8 ) << 8) | (( 8 ) << 11) | (( 8 ) << 14) )
}
 Texture/surface image formats (preliminary). More...

Functions

static uint pf_layout (uint f)
static uint pf_get (pipe_format_rgbazs_t f, uint shift, uint mask)
static uint pf_rev (pipe_format_ycbcr_t f)
const char * pf_name (enum pipe_format format)
 Builds pipe format name from format token.
static uint pf_get_component_bits (enum pipe_format format, uint comp)
 Return bits for a particular component.
static uint pf_get_bits (enum pipe_format format)
 Return total bits needed for the pixel format.
static uint pf_get_size (enum pipe_format format)
 Return bytes per pixel for the given format.
static void pf_get_block (enum pipe_format format, struct pipe_format_block *block)
 Describe pixel format's block.
static unsigned pf_get_nblocksx (const struct pipe_format_block *block, unsigned x)
static unsigned pf_get_nblocksy (const struct pipe_format_block *block, unsigned y)
static unsigned pf_get_nblocks (const struct pipe_format_block *block, unsigned width, unsigned height)
static boolean pf_is_compressed (enum pipe_format format)
static boolean pf_is_ycbcr (enum pipe_format format)
static boolean pf_has_alpha (enum pipe_format format)


Define Documentation

#define _PIPE_FORMAT_0000   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )

Definition at line 211 of file p_format.h.

#define _PIPE_FORMAT_000R   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_R )

Definition at line 212 of file p_format.h.

#define _PIPE_FORMAT_0Z00   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )

Definition at line 217 of file p_format.h.

#define _PIPE_FORMAT_1BGR   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )

Definition at line 209 of file p_format.h.

#define _PIPE_FORMAT_1RGB   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )

Definition at line 208 of file p_format.h.

#define _PIPE_FORMAT_ABGR   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R )

Definition at line 206 of file p_format.h.

#define _PIPE_FORMAT_ARGB   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )

Definition at line 205 of file p_format.h.

#define _PIPE_FORMAT_BGR1   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )

Definition at line 210 of file p_format.h.

#define _PIPE_FORMAT_BGRA   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_A )

Definition at line 207 of file p_format.h.

#define _PIPE_FORMAT_DXT ( LEVEL,
RSIZE,
GSIZE,
BSIZE,
ASIZE   ) 

Value:

((PIPE_FORMAT_LAYOUT_DXT << 0) | \
    ((LEVEL) << 2) | \
    ((RSIZE) << 5) | \
    ((GSIZE) << 8) | \
    ((BSIZE) << 11) | \
    ((ASIZE) << 14) )
Compresssed format layouts (this will probably change).

Definition at line 248 of file p_format.h.

#define _PIPE_FORMAT_MIXED ( SWZ,
SIZEX,
SIZEY,
SIZEZ,
SIZEW,
SIGNX,
SIGNY,
SIGNZ,
SIGNW,
NORMALIZED,
SCALE8   ) 

Value:

(\
   (PIPE_FORMAT_LAYOUT_MIXED << 0) |\
   ((SWZ) << 2) |\
   ((SIZEX) << 14) |\
   ((SIZEY) << 17) |\
   ((SIZEZ) << 20) |\
   ((SIZEW) << 23) |\
   ((SIGNX) << 26) |\
   ((SIGNY) << 27) |\
   ((SIGNZ) << 28) |\
   ((SIGNW) << 29) |\
   ((NORMALIZED) << 30) |\
   ((SCALE8) << 31) )
Helper macro to encode the above structure into a 32-bit value.

Definition at line 184 of file p_format.h.

#define _PIPE_FORMAT_R001   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )

Shorthand macro for common format swizzles.

Definition at line 201 of file p_format.h.

#define _PIPE_FORMAT_RG01   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1 )

Definition at line 202 of file p_format.h.

#define _PIPE_FORMAT_RGB1   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_1 )

Definition at line 203 of file p_format.h.

#define _PIPE_FORMAT_RGBA   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_A )

Definition at line 204 of file p_format.h.

#define _PIPE_FORMAT_RGBAZS ( SWZ,
SIZEX,
SIZEY,
SIZEZ,
SIZEW,
EXP2,
TYPE   ) 

Value:

(\
   (PIPE_FORMAT_LAYOUT_RGBAZS << 0) |\
   ((SWZ) << 2) |\
   ((SIZEX) << 14) |\
   ((SIZEY) << 17) |\
   ((SIZEZ) << 20) |\
   ((SIZEW) << 23) |\
   ((EXP2) << 26) |\
   ((TYPE) << 29) )
Helper macro to encode the above structure into a 32-bit value.

Definition at line 129 of file p_format.h.

#define _PIPE_FORMAT_RGBAZS_1 ( SWZ,
SIZEX,
SIZEY,
SIZEZ,
SIZEW,
TYPE   )     _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 0, TYPE )

Shorthand macro for RGBAZS layout with component sizes in 1-bit units.

Definition at line 147 of file p_format.h.

#define _PIPE_FORMAT_RGBAZS_2 ( SWZ,
SIZEX,
SIZEY,
SIZEZ,
SIZEW,
TYPE   )     _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 1, TYPE )

Shorthand macro for RGBAZS layout with component sizes in 2-bit units.

Definition at line 153 of file p_format.h.

#define _PIPE_FORMAT_RGBAZS_64 ( SWZ,
SIZEX,
SIZEY,
SIZEZ,
SIZEW,
TYPE   )     _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 6, TYPE )

Shorthand macro for RGBAZS layout with component sizes in 64-bit units.

Definition at line 165 of file p_format.h.

#define _PIPE_FORMAT_RGBAZS_8 ( SWZ,
SIZEX,
SIZEY,
SIZEZ,
SIZEW,
TYPE   )     _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 3, TYPE )

Shorthand macro for RGBAZS layout with component sizes in 8-bit units.

Definition at line 159 of file p_format.h.

#define _PIPE_FORMAT_RRR1   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )

Definition at line 213 of file p_format.h.

#define _PIPE_FORMAT_RRRG   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G )

Definition at line 215 of file p_format.h.

#define _PIPE_FORMAT_RRRR   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R )

Definition at line 214 of file p_format.h.

#define _PIPE_FORMAT_S000   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )

Definition at line 220 of file p_format.h.

#define _PIPE_FORMAT_SWZ ( SWZX,
SWZY,
SWZZ,
SWZW   )     (((SWZX) << 0) | ((SWZY) << 3) | ((SWZZ) << 6) | ((SWZW) << 9))

Helper macro to encode the swizzle part of the structure above.

Definition at line 142 of file p_format.h.

#define _PIPE_FORMAT_SZ00   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )

Definition at line 218 of file p_format.h.

#define _PIPE_FORMAT_YCBCR ( REV   ) 

Value:

(\
   (PIPE_FORMAT_LAYOUT_YCBCR << 0) |\
   ((REV) << 2) )
Helper macro to encode the above structure into a 32-bit value.

Definition at line 235 of file p_format.h.

#define _PIPE_FORMAT_Z000   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )

Definition at line 216 of file p_format.h.

#define _PIPE_FORMAT_ZS00   _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )

Definition at line 219 of file p_format.h.

#define pf_exp2 (  )     pf_get(f, 26, 0x7)

Scale size by 2 ^ exp2.

Definition at line 123 of file p_format.h.

#define pf_mixed_normalized (  )     pf_get( f, 30, 0x1 )

Definition at line 178 of file p_format.h.

#define pf_mixed_scale8 (  )     pf_get( f, 31, 0x1 )

Definition at line 179 of file p_format.h.

#define pf_mixed_sign_w (  )     pf_get( f, 29, 0x1 )

Definition at line 176 of file p_format.h.

#define pf_mixed_sign_x (  )     pf_get( f, 26, 0x1 )

Definition at line 173 of file p_format.h.

#define pf_mixed_sign_xyzw ( f,
 )     pf_get( f, 26 + (i), 0x1 )

Definition at line 177 of file p_format.h.

#define pf_mixed_sign_y (  )     pf_get( f, 27, 0x1 )

Definition at line 174 of file p_format.h.

#define pf_mixed_sign_z (  )     pf_get( f, 28, 0x1 )

Definition at line 175 of file p_format.h.

#define pf_size_w (  )     pf_get(f, 23, 0x7)

Size of W.

Definition at line 121 of file p_format.h.

#define pf_size_x (  )     pf_get(f, 14, 0x7)

Size of X.

Definition at line 118 of file p_format.h.

#define pf_size_xyzw ( f,
 )     pf_get(f, 14+((i)*3), 0x7)

Definition at line 122 of file p_format.h.

#define pf_size_y (  )     pf_get(f, 17, 0x7)

Size of Y.

Definition at line 119 of file p_format.h.

#define pf_size_z (  )     pf_get(f, 20, 0x7)

Size of Z.

Definition at line 120 of file p_format.h.

#define pf_swizzle_w (  )     pf_get(f, 11, 0x7)

PIPE_FORMAT_COMP_.

Definition at line 116 of file p_format.h.

#define pf_swizzle_x (  )     pf_get(f, 2, 0x7)

PIPE_FORMAT_COMP_.

Definition at line 113 of file p_format.h.

#define pf_swizzle_xyzw ( f,
 )     pf_get(f, 2+((i)*3), 0x7)

Definition at line 117 of file p_format.h.

#define pf_swizzle_y (  )     pf_get(f, 5, 0x7)

PIPE_FORMAT_COMP_.

Definition at line 114 of file p_format.h.

#define pf_swizzle_z (  )     pf_get(f, 8, 0x7)

PIPE_FORMAT_COMP_.

Definition at line 115 of file p_format.h.

#define pf_type (  )     pf_get(f, 29, 0x7)

PIPE_FORMAT_TYPE_.

Definition at line 124 of file p_format.h.

#define PIPE_FORMAT_COMP_0   4

Definition at line 71 of file p_format.h.

#define PIPE_FORMAT_COMP_1   5

Definition at line 72 of file p_format.h.

#define PIPE_FORMAT_COMP_A   3

Definition at line 70 of file p_format.h.

#define PIPE_FORMAT_COMP_B   2

Definition at line 69 of file p_format.h.

#define PIPE_FORMAT_COMP_G   1

Definition at line 68 of file p_format.h.

#define PIPE_FORMAT_COMP_R   0

RGBAZS Format Layout.

Format component selectors for RGBAZS & MIXED layout.

Definition at line 67 of file p_format.h.

#define PIPE_FORMAT_COMP_S   7

Definition at line 74 of file p_format.h.

#define PIPE_FORMAT_COMP_Z   6

Definition at line 73 of file p_format.h.

#define PIPE_FORMAT_LAYOUT_DXT   2

XXX temporary?

Definition at line 52 of file p_format.h.

#define PIPE_FORMAT_LAYOUT_MIXED   3

Definition at line 53 of file p_format.h.

#define PIPE_FORMAT_LAYOUT_RGBAZS   0

The pipe_format enum is a 32-bit wide bitfield that encodes all the information needed to uniquely describe a pixel format.

Possible format layouts are encoded in the first 2 bits. The interpretation of the remaining 30 bits depends on a particular format layout.

Definition at line 50 of file p_format.h.

#define PIPE_FORMAT_LAYOUT_YCBCR   1

Definition at line 51 of file p_format.h.

#define PIPE_FORMAT_TYPE_FIXED   7

16.16 fixed point

Definition at line 86 of file p_format.h.

#define PIPE_FORMAT_TYPE_FLOAT   1

16/32/64-bit/channel formats

Definition at line 80 of file p_format.h.

#define PIPE_FORMAT_TYPE_SNORM   3

ints, normalized to [-1,1]

Definition at line 82 of file p_format.h.

#define PIPE_FORMAT_TYPE_SRGB   6

sRGB colorspace

Definition at line 85 of file p_format.h.

#define PIPE_FORMAT_TYPE_SSCALED   5

ints, not normalized

Definition at line 84 of file p_format.h.

#define PIPE_FORMAT_TYPE_UNKNOWN   0

Format types for RGBAZS layout.

Definition at line 79 of file p_format.h.

#define PIPE_FORMAT_TYPE_UNORM   2

uints, normalized to [0,1]

Definition at line 81 of file p_format.h.

#define PIPE_FORMAT_TYPE_USCALED   4

uints, not normalized

Definition at line 83 of file p_format.h.


Typedef Documentation

typedef uint pipe_format_mixed_t

Definition at line 168 of file p_format.h.

typedef uint pipe_format_rgbazs_t

Because the destination vector is assumed to be RGBA FLOAT, we need to know how to swizzle and expand components from the source vector.

Let's take U_A1_R5_G5_B5 as an example. X swizzle is A, X size is 1 bit and type is UNORM. So we take the most significant bit from source vector, convert 0 to 0.0 and 1 to 1.0 and save it in the last component of the destination RGBA component. Next, Y swizzle is R, Y size is 5 and type is UNORM. We normalize those 5 bits into [0.0; 1.0] range and put it into second component of the destination vector. Rinse and repeat for components Z and W. If any of size fields is zero, it means the source format contains less than four components. If any swizzle is 0 or 1, the corresponding destination component should be filled with 0.0 and 1.0, respectively.

Definition at line 106 of file p_format.h.

typedef uint pipe_format_ycbcr_t

YCBCR Format Layout.

This only contains a flag that indicates whether the format is reversed or not.

Definition at line 230 of file p_format.h.


Enumeration Type Documentation

enum pipe_format

Texture/surface image formats (preliminary).

Enumerator:
PIPE_FORMAT_NONE 
PIPE_FORMAT_A8R8G8B8_UNORM 
PIPE_FORMAT_X8R8G8B8_UNORM 
PIPE_FORMAT_B8G8R8A8_UNORM 
PIPE_FORMAT_B8G8R8X8_UNORM 
PIPE_FORMAT_A1R5G5B5_UNORM 
PIPE_FORMAT_A4R4G4B4_UNORM 
PIPE_FORMAT_R5G6B5_UNORM 
PIPE_FORMAT_A2B10G10R10_UNORM 
PIPE_FORMAT_L8_UNORM 
PIPE_FORMAT_A8_UNORM 
PIPE_FORMAT_I8_UNORM 
PIPE_FORMAT_A8L8_UNORM 
PIPE_FORMAT_L16_UNORM 
PIPE_FORMAT_YCBCR 
PIPE_FORMAT_YCBCR_REV 
PIPE_FORMAT_Z16_UNORM 
PIPE_FORMAT_Z32_UNORM 
PIPE_FORMAT_Z32_FLOAT 
PIPE_FORMAT_S8Z24_UNORM 
PIPE_FORMAT_Z24S8_UNORM 
PIPE_FORMAT_X8Z24_UNORM 
PIPE_FORMAT_Z24X8_UNORM 
PIPE_FORMAT_S8_UNORM 
PIPE_FORMAT_R64_FLOAT 
PIPE_FORMAT_R64G64_FLOAT 
PIPE_FORMAT_R64G64B64_FLOAT 
PIPE_FORMAT_R64G64B64A64_FLOAT 
PIPE_FORMAT_R32_FLOAT 
PIPE_FORMAT_R32G32_FLOAT 
PIPE_FORMAT_R32G32B32_FLOAT 
PIPE_FORMAT_R32G32B32A32_FLOAT 
PIPE_FORMAT_R32_UNORM 
PIPE_FORMAT_R32G32_UNORM 
PIPE_FORMAT_R32G32B32_UNORM 
PIPE_FORMAT_R32G32B32A32_UNORM 
PIPE_FORMAT_R32_USCALED 
PIPE_FORMAT_R32G32_USCALED 
PIPE_FORMAT_R32G32B32_USCALED 
PIPE_FORMAT_R32G32B32A32_USCALED 
PIPE_FORMAT_R32_SNORM 
PIPE_FORMAT_R32G32_SNORM 
PIPE_FORMAT_R32G32B32_SNORM 
PIPE_FORMAT_R32G32B32A32_SNORM 
PIPE_FORMAT_R32_SSCALED 
PIPE_FORMAT_R32G32_SSCALED 
PIPE_FORMAT_R32G32B32_SSCALED 
PIPE_FORMAT_R32G32B32A32_SSCALED 
PIPE_FORMAT_R16_UNORM 
PIPE_FORMAT_R16G16_UNORM 
PIPE_FORMAT_R16G16B16_UNORM 
PIPE_FORMAT_R16G16B16A16_UNORM 
PIPE_FORMAT_R16_USCALED 
PIPE_FORMAT_R16G16_USCALED 
PIPE_FORMAT_R16G16B16_USCALED 
PIPE_FORMAT_R16G16B16A16_USCALED 
PIPE_FORMAT_R16_SNORM 
PIPE_FORMAT_R16G16_SNORM 
PIPE_FORMAT_R16G16B16_SNORM 
PIPE_FORMAT_R16G16B16A16_SNORM 
PIPE_FORMAT_R16_SSCALED 
PIPE_FORMAT_R16G16_SSCALED 
PIPE_FORMAT_R16G16B16_SSCALED 
PIPE_FORMAT_R16G16B16A16_SSCALED 
PIPE_FORMAT_R8_UNORM 
PIPE_FORMAT_R8G8_UNORM 
PIPE_FORMAT_R8G8B8_UNORM 
PIPE_FORMAT_R8G8B8A8_UNORM 
PIPE_FORMAT_R8G8B8X8_UNORM 
PIPE_FORMAT_R8_USCALED 
PIPE_FORMAT_R8G8_USCALED 
PIPE_FORMAT_R8G8B8_USCALED 
PIPE_FORMAT_R8G8B8A8_USCALED 
PIPE_FORMAT_R8G8B8X8_USCALED 
PIPE_FORMAT_R8_SNORM 
PIPE_FORMAT_R8G8_SNORM 
PIPE_FORMAT_R8G8B8_SNORM 
PIPE_FORMAT_R8G8B8A8_SNORM 
PIPE_FORMAT_R8G8B8X8_SNORM 
PIPE_FORMAT_B6G5R5_SNORM 
PIPE_FORMAT_A8B8G8R8_SNORM 
PIPE_FORMAT_X8B8G8R8_SNORM 
PIPE_FORMAT_R8_SSCALED 
PIPE_FORMAT_R8G8_SSCALED 
PIPE_FORMAT_R8G8B8_SSCALED 
PIPE_FORMAT_R8G8B8A8_SSCALED 
PIPE_FORMAT_R8G8B8X8_SSCALED 
PIPE_FORMAT_R32_FIXED 
PIPE_FORMAT_R32G32_FIXED 
PIPE_FORMAT_R32G32B32_FIXED 
PIPE_FORMAT_R32G32B32A32_FIXED 
PIPE_FORMAT_L8_SRGB 
PIPE_FORMAT_A8_L8_SRGB 
PIPE_FORMAT_R8G8B8_SRGB 
PIPE_FORMAT_R8G8B8A8_SRGB 
PIPE_FORMAT_R8G8B8X8_SRGB 
PIPE_FORMAT_X8UB8UG8SR8S_NORM 
PIPE_FORMAT_B6UG5SR5S_NORM 
PIPE_FORMAT_DXT1_RGB 
PIPE_FORMAT_DXT1_RGBA 
PIPE_FORMAT_DXT3_RGBA 
PIPE_FORMAT_DXT5_RGBA 

Definition at line 269 of file p_format.h.

00269                  {
00270    PIPE_FORMAT_NONE                  = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_0000, 0, 0, 0, 0, PIPE_FORMAT_TYPE_UNKNOWN ),
00271    PIPE_FORMAT_A8R8G8B8_UNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_ARGB, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ),
00272    PIPE_FORMAT_X8R8G8B8_UNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_1RGB, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ),
00273    PIPE_FORMAT_B8G8R8A8_UNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGRA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ),
00274    PIPE_FORMAT_B8G8R8X8_UNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGR1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ),
00275    PIPE_FORMAT_A1R5G5B5_UNORM        = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_ARGB, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM ),
00276    PIPE_FORMAT_A4R4G4B4_UNORM        = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_ARGB, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM ),
00277    PIPE_FORMAT_R5G6B5_UNORM          = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_RGB1, 5, 6, 5, 0, PIPE_FORMAT_TYPE_UNORM ),
00278    PIPE_FORMAT_A2B10G10R10_UNORM     = _PIPE_FORMAT_RGBAZS_2 ( _PIPE_FORMAT_ABGR, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM ),
00279    PIPE_FORMAT_L8_UNORM              = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM ), 
00280    PIPE_FORMAT_A8_UNORM              = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_000R, 0, 0, 0, 1, PIPE_FORMAT_TYPE_UNORM ), 
00281    PIPE_FORMAT_I8_UNORM              = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRR, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ), 
00282    PIPE_FORMAT_A8L8_UNORM            = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRG, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ), 
00283    PIPE_FORMAT_L16_UNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM ), 
00284    PIPE_FORMAT_YCBCR                 = _PIPE_FORMAT_YCBCR( 0 ),
00285    PIPE_FORMAT_YCBCR_REV             = _PIPE_FORMAT_YCBCR( 1 ),
00286    PIPE_FORMAT_Z16_UNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00287    PIPE_FORMAT_Z32_UNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00288    PIPE_FORMAT_Z32_FLOAT             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT ),
00289    PIPE_FORMAT_S8Z24_UNORM           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_SZ00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00290    PIPE_FORMAT_Z24S8_UNORM           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_ZS00, 3, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00291    PIPE_FORMAT_X8Z24_UNORM           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_0Z00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00292    PIPE_FORMAT_Z24X8_UNORM           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_Z000, 3, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00293    PIPE_FORMAT_S8_UNORM              = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_S000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ), 
00294    PIPE_FORMAT_R64_FLOAT             = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT ),
00295    PIPE_FORMAT_R64G64_FLOAT          = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_FLOAT ),
00296    PIPE_FORMAT_R64G64B64_FLOAT       = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_FLOAT ),
00297    PIPE_FORMAT_R64G64B64A64_FLOAT    = _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_FLOAT ),
00298    PIPE_FORMAT_R32_FLOAT             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT ),
00299    PIPE_FORMAT_R32G32_FLOAT          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FLOAT ),
00300    PIPE_FORMAT_R32G32B32_FLOAT       = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FLOAT ),
00301    PIPE_FORMAT_R32G32B32A32_FLOAT    = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FLOAT ),
00302    PIPE_FORMAT_R32_UNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00303    PIPE_FORMAT_R32G32_UNORM          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00304    PIPE_FORMAT_R32G32B32_UNORM       = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_UNORM ),
00305    PIPE_FORMAT_R32G32B32A32_UNORM    = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM ),
00306    PIPE_FORMAT_R32_USCALED           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED ),
00307    PIPE_FORMAT_R32G32_USCALED        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_USCALED ),
00308    PIPE_FORMAT_R32G32B32_USCALED     = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_USCALED ),
00309    PIPE_FORMAT_R32G32B32A32_USCALED  = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_USCALED ),
00310    PIPE_FORMAT_R32_SNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM ),
00311    PIPE_FORMAT_R32G32_SNORM          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SNORM ),
00312    PIPE_FORMAT_R32G32B32_SNORM       = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SNORM ),
00313    PIPE_FORMAT_R32G32B32A32_SNORM    = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SNORM ),
00314    PIPE_FORMAT_R32_SSCALED           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED ),
00315    PIPE_FORMAT_R32G32_SSCALED        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SSCALED ),
00316    PIPE_FORMAT_R32G32B32_SSCALED     = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SSCALED ),
00317    PIPE_FORMAT_R32G32B32A32_SSCALED  = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SSCALED ),
00318    PIPE_FORMAT_R16_UNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00319    PIPE_FORMAT_R16G16_UNORM          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00320    PIPE_FORMAT_R16G16B16_UNORM       = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM ),
00321    PIPE_FORMAT_R16G16B16A16_UNORM    = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_UNORM ),
00322    PIPE_FORMAT_R16_USCALED           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED ),
00323    PIPE_FORMAT_R16G16_USCALED        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_USCALED ),
00324    PIPE_FORMAT_R16G16B16_USCALED     = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_USCALED ),
00325    PIPE_FORMAT_R16G16B16A16_USCALED  = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_USCALED ),
00326    PIPE_FORMAT_R16_SNORM             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM ),
00327    PIPE_FORMAT_R16G16_SNORM          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SNORM ),
00328    PIPE_FORMAT_R16G16B16_SNORM       = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SNORM ),
00329    PIPE_FORMAT_R16G16B16A16_SNORM    = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SNORM ),
00330    PIPE_FORMAT_R16_SSCALED           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED ),
00331    PIPE_FORMAT_R16G16_SSCALED        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SSCALED ),
00332    PIPE_FORMAT_R16G16B16_SSCALED     = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SSCALED ),
00333    PIPE_FORMAT_R16G16B16A16_SSCALED  = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SSCALED ),
00334    PIPE_FORMAT_R8_UNORM              = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00335    PIPE_FORMAT_R8G8_UNORM            = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM ),
00336    PIPE_FORMAT_R8G8B8_UNORM          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM ),
00337    PIPE_FORMAT_R8G8B8A8_UNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ),
00338    PIPE_FORMAT_R8G8B8X8_UNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM ),
00339    PIPE_FORMAT_R8_USCALED            = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED ),
00340    PIPE_FORMAT_R8G8_USCALED          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_USCALED ),
00341    PIPE_FORMAT_R8G8B8_USCALED        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_USCALED ),
00342    PIPE_FORMAT_R8G8B8A8_USCALED      = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED ),
00343    PIPE_FORMAT_R8G8B8X8_USCALED      = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED ),
00344    PIPE_FORMAT_R8_SNORM              = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM ),
00345    PIPE_FORMAT_R8G8_SNORM            = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SNORM ),
00346    PIPE_FORMAT_R8G8B8_SNORM          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SNORM ),
00347    PIPE_FORMAT_R8G8B8A8_SNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM ),
00348    PIPE_FORMAT_R8G8B8X8_SNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM ),
00349    PIPE_FORMAT_B6G5R5_SNORM          = _PIPE_FORMAT_RGBAZS_1 ( _PIPE_FORMAT_BGR1, 6, 5, 5, 0, PIPE_FORMAT_TYPE_SNORM ),
00350    PIPE_FORMAT_A8B8G8R8_SNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGRA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM ),
00351    PIPE_FORMAT_X8B8G8R8_SNORM        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_BGR1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM ),
00352    PIPE_FORMAT_R8_SSCALED            = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED ),
00353    PIPE_FORMAT_R8G8_SSCALED          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SSCALED ),
00354    PIPE_FORMAT_R8G8B8_SSCALED        = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SSCALED ),
00355    PIPE_FORMAT_R8G8B8A8_SSCALED      = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED ),
00356    PIPE_FORMAT_R8G8B8X8_SSCALED      = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED ),
00357    PIPE_FORMAT_R32_FIXED             = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_R001, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FIXED ),
00358    PIPE_FORMAT_R32G32_FIXED          = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RG01, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FIXED ),
00359    PIPE_FORMAT_R32G32B32_FIXED       = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FIXED ),
00360    PIPE_FORMAT_R32G32B32A32_FIXED    = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FIXED ),
00361    /* sRGB formats */
00362    PIPE_FORMAT_L8_SRGB               = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRR1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SRGB ),
00363    PIPE_FORMAT_A8_L8_SRGB            = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RRRG, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB ),
00364    PIPE_FORMAT_R8G8B8_SRGB           = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SRGB ),
00365    PIPE_FORMAT_R8G8B8A8_SRGB         = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB ),
00366    PIPE_FORMAT_R8G8B8X8_SRGB         = _PIPE_FORMAT_RGBAZS_8 ( _PIPE_FORMAT_RGB1, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SRGB ),
00367 
00368    /* mixed formats */
00369    PIPE_FORMAT_X8UB8UG8SR8S_NORM     = _PIPE_FORMAT_MIXED( _PIPE_FORMAT_1BGR, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 ),
00370    PIPE_FORMAT_B6UG5SR5S_NORM        = _PIPE_FORMAT_MIXED( _PIPE_FORMAT_BGR1, 6, 5, 5, 0, 0, 1, 1, 0, 1, 0 ),
00371 
00372    /* compressed formats */
00373    PIPE_FORMAT_DXT1_RGB              = _PIPE_FORMAT_DXT( 1, 8, 8, 8, 0 ),
00374    PIPE_FORMAT_DXT1_RGBA             = _PIPE_FORMAT_DXT( 1, 8, 8, 8, 8 ),
00375    PIPE_FORMAT_DXT3_RGBA             = _PIPE_FORMAT_DXT( 3, 8, 8, 8, 8 ),
00376    PIPE_FORMAT_DXT5_RGBA             = _PIPE_FORMAT_DXT( 5, 8, 8, 8, 8 )
00377 };


Function Documentation

static uint pf_get ( pipe_format_rgbazs_t  f,
uint  shift,
uint  mask 
) [static]

Definition at line 108 of file p_format.h.

00109 {
00110    return (f >> shift) & mask;
00111 }

static uint pf_get_bits ( enum pipe_format  format  )  [static]

Return total bits needed for the pixel format.

Definition at line 415 of file p_format.h.

References assert, pf_get_component_bits(), pf_layout(), PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_1, PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_LAYOUT_MIXED, PIPE_FORMAT_LAYOUT_RGBAZS, PIPE_FORMAT_LAYOUT_YCBCR, PIPE_FORMAT_YCBCR, and PIPE_FORMAT_YCBCR_REV.

00416 {
00417    switch (pf_layout(format)) {
00418    case PIPE_FORMAT_LAYOUT_RGBAZS:
00419    case PIPE_FORMAT_LAYOUT_MIXED:
00420       return
00421          pf_get_component_bits( format, PIPE_FORMAT_COMP_0 ) +
00422          pf_get_component_bits( format, PIPE_FORMAT_COMP_1 ) +
00423          pf_get_component_bits( format, PIPE_FORMAT_COMP_R ) +
00424          pf_get_component_bits( format, PIPE_FORMAT_COMP_G ) +
00425          pf_get_component_bits( format, PIPE_FORMAT_COMP_B ) +
00426          pf_get_component_bits( format, PIPE_FORMAT_COMP_A ) +
00427          pf_get_component_bits( format, PIPE_FORMAT_COMP_Z ) +
00428          pf_get_component_bits( format, PIPE_FORMAT_COMP_S );
00429    case PIPE_FORMAT_LAYOUT_YCBCR:
00430       assert( format == PIPE_FORMAT_YCBCR || format == PIPE_FORMAT_YCBCR_REV );
00431       /* return effective bits per pixel */
00432       return 16; 
00433    default:
00434       assert( 0 );
00435       return 0;
00436    }
00437 }

static void pf_get_block ( enum pipe_format  format,
struct pipe_format_block block 
) [static]

Describe pixel format's block.

See also:
http://msdn2.microsoft.com/en-us/library/ms796147.aspx

Definition at line 475 of file p_format.h.

References pipe_format_block::height, pf_get_size(), PIPE_FORMAT_DXT1_RGB, PIPE_FORMAT_DXT1_RGBA, PIPE_FORMAT_DXT3_RGBA, PIPE_FORMAT_DXT5_RGBA, PIPE_FORMAT_YCBCR, PIPE_FORMAT_YCBCR_REV, pipe_format_block::size, and pipe_format_block::width.

00476 {
00477    switch(format) {
00478    case PIPE_FORMAT_DXT1_RGBA:
00479    case PIPE_FORMAT_DXT1_RGB:
00480       block->size = 8;
00481       block->width = 4;
00482       block->height = 4;
00483       break;
00484    case PIPE_FORMAT_DXT3_RGBA:
00485    case PIPE_FORMAT_DXT5_RGBA:
00486       block->size = 16;
00487       block->width = 4;
00488       block->height = 4;
00489       break;
00490    case PIPE_FORMAT_YCBCR:
00491    case PIPE_FORMAT_YCBCR_REV:
00492       block->size = 4; /* 2*cpp */
00493       block->width = 2;
00494       block->height = 1;
00495       break;
00496    default:
00497       block->size = pf_get_size(format);
00498       block->width = 1;
00499       block->height = 1;
00500       break;
00501    }
00502 }

static uint pf_get_component_bits ( enum pipe_format  format,
uint  comp 
) [static]

Return bits for a particular component.

Parameters:
comp component index, starting at 0

< PIPE_FORMAT_COMP_

< Size of X

< PIPE_FORMAT_COMP_

< Size of Y

< PIPE_FORMAT_COMP_

< Size of Z

< PIPE_FORMAT_COMP_

< Size of W

< Scale size by 2 ^ exp2

Definition at line 388 of file p_format.h.

References pf_exp2, pf_layout(), pf_mixed_scale8, pf_size_w, pf_size_x, pf_size_y, pf_size_z, pf_swizzle_w, pf_swizzle_x, pf_swizzle_y, pf_swizzle_z, and PIPE_FORMAT_LAYOUT_RGBAZS.

00389 {
00390    uint size;
00391 
00392    if (pf_swizzle_x(format) == comp) {
00393       size = pf_size_x(format);
00394    }
00395    else if (pf_swizzle_y(format) == comp) {
00396       size = pf_size_y(format);
00397    }
00398    else if (pf_swizzle_z(format) == comp) {
00399       size = pf_size_z(format);
00400    }
00401    else if (pf_swizzle_w(format) == comp) {
00402       size = pf_size_w(format);
00403    }
00404    else {
00405       size = 0;
00406    }
00407    if (pf_layout( format ) == PIPE_FORMAT_LAYOUT_RGBAZS)
00408       return size << pf_exp2( format );
00409    return size << (pf_mixed_scale8( format ) * 3);
00410 }

static unsigned pf_get_nblocks ( const struct pipe_format_block block,
unsigned  width,
unsigned  height 
) [static]

Definition at line 517 of file p_format.h.

References pf_get_nblocksx(), and pf_get_nblocksy().

00518 {
00519    return pf_get_nblocksx(block, width)*pf_get_nblocksy(block, height);
00520 }

static unsigned pf_get_nblocksx ( const struct pipe_format_block block,
unsigned  x 
) [static]

Definition at line 505 of file p_format.h.

References pipe_format_block::width.

00506 {
00507    return (x + block->width - 1)/block->width;
00508 }

static unsigned pf_get_nblocksy ( const struct pipe_format_block block,
unsigned  y 
) [static]

Definition at line 511 of file p_format.h.

References pipe_format_block::height.

00512 {
00513    return (y + block->height - 1)/block->height;
00514 }

static uint pf_get_size ( enum pipe_format  format  )  [static]

Return bytes per pixel for the given format.

Definition at line 442 of file p_format.h.

References assert, and pf_get_bits().

00443 {
00444    assert(pf_get_bits(format) % 8 == 0);
00445    return pf_get_bits(format) / 8;
00446 }

static boolean pf_has_alpha ( enum pipe_format  format  )  [static]

< XXX temporary?

Definition at line 535 of file p_format.h.

References assert, FALSE, pf_get_component_bits(), pf_layout(), PIPE_FORMAT_A8_L8_SRGB, PIPE_FORMAT_A8_UNORM, PIPE_FORMAT_A8L8_UNORM, PIPE_FORMAT_COMP_A, PIPE_FORMAT_DXT1_RGBA, PIPE_FORMAT_DXT3_RGBA, PIPE_FORMAT_DXT5_RGBA, PIPE_FORMAT_LAYOUT_DXT, PIPE_FORMAT_LAYOUT_MIXED, PIPE_FORMAT_LAYOUT_RGBAZS, PIPE_FORMAT_LAYOUT_YCBCR, and TRUE.

00536 {
00537    switch (pf_layout(format)) {
00538    case PIPE_FORMAT_LAYOUT_RGBAZS:
00539    case PIPE_FORMAT_LAYOUT_MIXED:
00540       /* FIXME: pf_get_component_bits( PIPE_FORMAT_A8L8_UNORM, PIPE_FORMAT_COMP_A ) should not return 0 right? */
00541       if(format == PIPE_FORMAT_A8_UNORM || 
00542          format == PIPE_FORMAT_A8L8_UNORM || 
00543          format == PIPE_FORMAT_A8_L8_SRGB)
00544          return TRUE;
00545       return pf_get_component_bits( format, PIPE_FORMAT_COMP_A ) ? TRUE : FALSE;
00546    case PIPE_FORMAT_LAYOUT_YCBCR:
00547       return FALSE; 
00548    case PIPE_FORMAT_LAYOUT_DXT:
00549       switch (format) {
00550       case PIPE_FORMAT_DXT1_RGBA:
00551       case PIPE_FORMAT_DXT3_RGBA:
00552       case PIPE_FORMAT_DXT5_RGBA:
00553          return TRUE;
00554       default:
00555          return FALSE;
00556       }
00557    default:
00558       assert( 0 );
00559       return FALSE;
00560    }
00561 }

static boolean pf_is_compressed ( enum pipe_format  format  )  [static]

< XXX temporary?

Definition at line 523 of file p_format.h.

References FALSE, pf_layout(), PIPE_FORMAT_LAYOUT_DXT, and TRUE.

00524 {
00525    return pf_layout(format) == PIPE_FORMAT_LAYOUT_DXT ? TRUE : FALSE;
00526 }

static boolean pf_is_ycbcr ( enum pipe_format  format  )  [static]

Definition at line 529 of file p_format.h.

References FALSE, pf_layout(), PIPE_FORMAT_LAYOUT_YCBCR, and TRUE.

00530 {
00531    return pf_layout(format) == PIPE_FORMAT_LAYOUT_YCBCR ? TRUE : FALSE;
00532 }

static uint pf_layout ( uint  f  )  [static]

Parameters:
f  PIPE_FORMAT_LAYOUT_

Definition at line 55 of file p_format.h.

00056 {
00057    return f & 0x3;
00058 }

const char* pf_name ( enum pipe_format  format  ) 

Builds pipe format name from format token.

Definition at line 521 of file p_debug.c.

References debug_dump_enum().

00522 {
00523    return debug_dump_enum(pipe_format_names, format);
00524 }

static uint pf_rev ( pipe_format_ycbcr_t  f  )  [static]

Definition at line 239 of file p_format.h.

00240 {
00241    return (f >> 2) & 0x1;
00242 }


Generated on Tue Sep 29 06:25:44 2009 for Gallium3D by  doxygen 1.5.4