PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
+PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzy1, srgb
PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
# Depth-stencil formats
+# UNORM isn't really fitting. Only applies to depth, not stencil component
PIPE_FORMAT_S8_UNORM , plain, 1, 1, un8 , , , , _x__, zs
PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs
PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs
PIPE_FORMAT_S8Z24_UNORM , plain, 1, 1, un8 , un24, , , yx__, zs
PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, un8 , , , x___, zs
PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, un8 , un24, , , y___, zs
+PIPE_FORMAT_Z32_FLOAT_S8X24_UNORM , plain, 1, 1, f32, un8 , un24, , xy__, zs
# YUV formats
# http://www.fourcc.org/yuv.php#UYVY
# XXX: u_tile.c's ycbcr_get_tile_rgba actually interprets it as VYUY but the
# intent should be to match D3DFMT_YUY2
PIPE_FORMAT_YUYV , subsampled, 2, 1, x32 , , , , xyz1, yuv
+# same subsampling but with rgb channels
+PIPE_FORMAT_R8G8_B8G8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb
+PIPE_FORMAT_G8R8_G8B8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb
+
+# some special formats not fitting anywhere else
+PIPE_FORMAT_R10G10B10A2_USCALED , plain, 1, 1, u10 , u10 , u10 , u2 , xyzw, rgb
+PIPE_FORMAT_R11G11B10_FLOAT , plain, 1, 1, f11 , f11 , f10 , , xyz1, rgb
+PIPE_FORMAT_R9G9B9E5_FLOAT , compressed, 1, 1, x32 , , , , xyz1, rgb
+PIPE_FORMAT_R1_UNORM , compressed, 8, 1, x8 , , , , x001, rgb
# Compressed formats
PIPE_FORMAT_DXT1_RGB , compressed, 4, 4, x64 , , , , xyz1, rgb
PIPE_FORMAT_DXT1_SRGBA , compressed, 4, 4, x64 , , , , xyzw, srgb
PIPE_FORMAT_DXT3_SRGBA , compressed, 4, 4, x128, , , , xyzw, srgb
PIPE_FORMAT_DXT5_SRGBA , compressed, 4, 4, x128, , , , xyzw, srgb
+PIPE_FORMAT_RGTC1_UNORM , compressed, 4, 4, x64, , , , x001, rgb
+PIPE_FORMAT_RGTC1_SNORM , compressed, 4, 4, x64, , , , x001, rgb
+PIPE_FORMAT_RGTC2_UNORM , compressed, 4, 4, x128, , , , xy01, rgb
+PIPE_FORMAT_RGTC2_SNORM , compressed, 4, 4, x128, , , , xy01, rgb
# Straightforward D3D10-like formats (also used for
# vertex buffer element description)
PIPE_FORMAT_R32G32_FIXED , plain, 1, 1, h32 , h32 , , , xy01, rgb
PIPE_FORMAT_R32G32B32_FIXED , plain, 1, 1, h32 , h32 , h32 , , xyz1, rgb
PIPE_FORMAT_R32G32B32A32_FIXED , plain, 1, 1, h32 , h32 , h32 , h32 , xyzw, rgb
+PIPE_FORMAT_R16_FLOAT , plain, 1, 1, f16 , , , , x001, rgb
+PIPE_FORMAT_R16G16_FLOAT , plain, 1, 1, f16 , f16 , , , xy01, rgb
+PIPE_FORMAT_R16G16B16_FLOAT , plain, 1, 1, f16 , f16 , f16 , , xyz1, rgb
+PIPE_FORMAT_R16G16B16A16_FLOAT , plain, 1, 1, f16 , f16 , f16 , f16 , xyzw, rgb
PIPE_FORMAT_R16_UNORM , plain, 1, 1, un16, , , , x001, rgb
PIPE_FORMAT_R16G16_UNORM , plain, 1, 1, un16, un16, , , xy01, rgb
PIPE_FORMAT_R16G16B16_UNORM , plain, 1, 1, un16, un16, un16, , xyz1, rgb
*/
enum pipe_format {
- PIPE_FORMAT_NONE = 0,
- PIPE_FORMAT_B8G8R8A8_UNORM = 1,
- PIPE_FORMAT_B8G8R8X8_UNORM = 2,
- PIPE_FORMAT_A8R8G8B8_UNORM = 3,
- PIPE_FORMAT_X8R8G8B8_UNORM = 4,
- PIPE_FORMAT_B5G5R5A1_UNORM = 5,
- PIPE_FORMAT_B4G4R4A4_UNORM = 6,
- PIPE_FORMAT_B5G6R5_UNORM = 7,
- PIPE_FORMAT_R10G10B10A2_UNORM = 8,
- PIPE_FORMAT_L8_UNORM = 9, /**< ubyte luminance */
- PIPE_FORMAT_A8_UNORM = 10, /**< ubyte alpha */
- PIPE_FORMAT_I8_UNORM = 11, /**< ubyte intensity */
- PIPE_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */
- PIPE_FORMAT_L16_UNORM = 13, /**< ushort luminance */
- PIPE_FORMAT_UYVY = 14,
- PIPE_FORMAT_YUYV = 15,
- PIPE_FORMAT_Z16_UNORM = 16,
- PIPE_FORMAT_Z32_UNORM = 17,
- PIPE_FORMAT_Z32_FLOAT = 18,
- PIPE_FORMAT_Z24S8_UNORM = 19,
- PIPE_FORMAT_S8Z24_UNORM = 20,
- PIPE_FORMAT_Z24X8_UNORM = 21,
- PIPE_FORMAT_X8Z24_UNORM = 22,
- PIPE_FORMAT_S8_UNORM = 23, /**< ubyte stencil */
- PIPE_FORMAT_R64_FLOAT = 24,
- PIPE_FORMAT_R64G64_FLOAT = 25,
- PIPE_FORMAT_R64G64B64_FLOAT = 26,
- PIPE_FORMAT_R64G64B64A64_FLOAT = 27,
- PIPE_FORMAT_R32_FLOAT = 28,
- PIPE_FORMAT_R32G32_FLOAT = 29,
- PIPE_FORMAT_R32G32B32_FLOAT = 30,
- PIPE_FORMAT_R32G32B32A32_FLOAT = 31,
- PIPE_FORMAT_R32_UNORM = 32,
- PIPE_FORMAT_R32G32_UNORM = 33,
- PIPE_FORMAT_R32G32B32_UNORM = 34,
- PIPE_FORMAT_R32G32B32A32_UNORM = 35,
- PIPE_FORMAT_R32_USCALED = 36,
- PIPE_FORMAT_R32G32_USCALED = 37,
- PIPE_FORMAT_R32G32B32_USCALED = 38,
- PIPE_FORMAT_R32G32B32A32_USCALED = 39,
- PIPE_FORMAT_R32_SNORM = 40,
- PIPE_FORMAT_R32G32_SNORM = 41,
- PIPE_FORMAT_R32G32B32_SNORM = 42,
- PIPE_FORMAT_R32G32B32A32_SNORM = 43,
- PIPE_FORMAT_R32_SSCALED = 44,
- PIPE_FORMAT_R32G32_SSCALED = 45,
- PIPE_FORMAT_R32G32B32_SSCALED = 46,
- PIPE_FORMAT_R32G32B32A32_SSCALED = 47,
- PIPE_FORMAT_R16_UNORM = 48,
- PIPE_FORMAT_R16G16_UNORM = 49,
- PIPE_FORMAT_R16G16B16_UNORM = 50,
- PIPE_FORMAT_R16G16B16A16_UNORM = 51,
- PIPE_FORMAT_R16_USCALED = 52,
- PIPE_FORMAT_R16G16_USCALED = 53,
- PIPE_FORMAT_R16G16B16_USCALED = 54,
- PIPE_FORMAT_R16G16B16A16_USCALED = 55,
- PIPE_FORMAT_R16_SNORM = 56,
- PIPE_FORMAT_R16G16_SNORM = 57,
- PIPE_FORMAT_R16G16B16_SNORM = 58,
- PIPE_FORMAT_R16G16B16A16_SNORM = 59,
- PIPE_FORMAT_R16_SSCALED = 60,
- PIPE_FORMAT_R16G16_SSCALED = 61,
- PIPE_FORMAT_R16G16B16_SSCALED = 62,
- PIPE_FORMAT_R16G16B16A16_SSCALED = 63,
- PIPE_FORMAT_R8_UNORM = 64,
- PIPE_FORMAT_R8G8_UNORM = 65,
- PIPE_FORMAT_R8G8B8_UNORM = 66,
- PIPE_FORMAT_R8G8B8A8_UNORM = 67,
- PIPE_FORMAT_X8B8G8R8_UNORM = 68,
- PIPE_FORMAT_R8_USCALED = 69,
- PIPE_FORMAT_R8G8_USCALED = 70,
- PIPE_FORMAT_R8G8B8_USCALED = 71,
- PIPE_FORMAT_R8G8B8A8_USCALED = 72,
- PIPE_FORMAT_R8_SNORM = 74,
- PIPE_FORMAT_R8G8_SNORM = 75,
- PIPE_FORMAT_R8G8B8_SNORM = 76,
- PIPE_FORMAT_R8G8B8A8_SNORM = 77,
- PIPE_FORMAT_R8_SSCALED = 82,
- PIPE_FORMAT_R8G8_SSCALED = 83,
- PIPE_FORMAT_R8G8B8_SSCALED = 84,
- PIPE_FORMAT_R8G8B8A8_SSCALED = 85,
- PIPE_FORMAT_R32_FIXED = 87,
- PIPE_FORMAT_R32G32_FIXED = 88,
- PIPE_FORMAT_R32G32B32_FIXED = 89,
- PIPE_FORMAT_R32G32B32A32_FIXED = 90,
- /* sRGB formats */
- PIPE_FORMAT_L8_SRGB = 91,
- PIPE_FORMAT_L8A8_SRGB = 92,
- PIPE_FORMAT_R8G8B8_SRGB = 93,
- PIPE_FORMAT_A8B8G8R8_SRGB = 94,
- PIPE_FORMAT_X8B8G8R8_SRGB = 95,
- PIPE_FORMAT_B8G8R8A8_SRGB = 96,
- PIPE_FORMAT_B8G8R8X8_SRGB = 97,
- PIPE_FORMAT_A8R8G8B8_SRGB = 98,
- PIPE_FORMAT_X8R8G8B8_SRGB = 99,
+ PIPE_FORMAT_NONE = 0,
+ PIPE_FORMAT_B8G8R8A8_UNORM = 1,
+ PIPE_FORMAT_B8G8R8X8_UNORM = 2,
+ PIPE_FORMAT_A8R8G8B8_UNORM = 3,
+ PIPE_FORMAT_X8R8G8B8_UNORM = 4,
+ PIPE_FORMAT_B5G5R5A1_UNORM = 5,
+ PIPE_FORMAT_B4G4R4A4_UNORM = 6,
+ PIPE_FORMAT_B5G6R5_UNORM = 7,
+ PIPE_FORMAT_R10G10B10A2_UNORM = 8,
+ PIPE_FORMAT_L8_UNORM = 9, /**< ubyte luminance */
+ PIPE_FORMAT_A8_UNORM = 10, /**< ubyte alpha */
+ PIPE_FORMAT_I8_UNORM = 11, /**< ubyte intensity */
+ PIPE_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */
+ PIPE_FORMAT_L16_UNORM = 13, /**< ushort luminance */
+ PIPE_FORMAT_UYVY = 14,
+ PIPE_FORMAT_YUYV = 15,
+ PIPE_FORMAT_Z16_UNORM = 16,
+ PIPE_FORMAT_Z32_UNORM = 17,
+ PIPE_FORMAT_Z32_FLOAT = 18,
+ PIPE_FORMAT_Z24S8_UNORM = 19,
+ PIPE_FORMAT_S8Z24_UNORM = 20,
+ PIPE_FORMAT_Z24X8_UNORM = 21,
+ PIPE_FORMAT_X8Z24_UNORM = 22,
+ PIPE_FORMAT_S8_UNORM = 23, /**< ubyte stencil */
+ PIPE_FORMAT_R64_FLOAT = 24,
+ PIPE_FORMAT_R64G64_FLOAT = 25,
+ PIPE_FORMAT_R64G64B64_FLOAT = 26,
+ PIPE_FORMAT_R64G64B64A64_FLOAT = 27,
+ PIPE_FORMAT_R32_FLOAT = 28,
+ PIPE_FORMAT_R32G32_FLOAT = 29,
+ PIPE_FORMAT_R32G32B32_FLOAT = 30,
+ PIPE_FORMAT_R32G32B32A32_FLOAT = 31,
+ PIPE_FORMAT_R32_UNORM = 32,
+ PIPE_FORMAT_R32G32_UNORM = 33,
+ PIPE_FORMAT_R32G32B32_UNORM = 34,
+ PIPE_FORMAT_R32G32B32A32_UNORM = 35,
+ PIPE_FORMAT_R32_USCALED = 36,
+ PIPE_FORMAT_R32G32_USCALED = 37,
+ PIPE_FORMAT_R32G32B32_USCALED = 38,
+ PIPE_FORMAT_R32G32B32A32_USCALED = 39,
+ PIPE_FORMAT_R32_SNORM = 40,
+ PIPE_FORMAT_R32G32_SNORM = 41,
+ PIPE_FORMAT_R32G32B32_SNORM = 42,
+ PIPE_FORMAT_R32G32B32A32_SNORM = 43,
+ PIPE_FORMAT_R32_SSCALED = 44,
+ PIPE_FORMAT_R32G32_SSCALED = 45,
+ PIPE_FORMAT_R32G32B32_SSCALED = 46,
+ PIPE_FORMAT_R32G32B32A32_SSCALED = 47,
+ PIPE_FORMAT_R16_UNORM = 48,
+ PIPE_FORMAT_R16G16_UNORM = 49,
+ PIPE_FORMAT_R16G16B16_UNORM = 50,
+ PIPE_FORMAT_R16G16B16A16_UNORM = 51,
+ PIPE_FORMAT_R16_USCALED = 52,
+ PIPE_FORMAT_R16G16_USCALED = 53,
+ PIPE_FORMAT_R16G16B16_USCALED = 54,
+ PIPE_FORMAT_R16G16B16A16_USCALED = 55,
+ PIPE_FORMAT_R16_SNORM = 56,
+ PIPE_FORMAT_R16G16_SNORM = 57,
+ PIPE_FORMAT_R16G16B16_SNORM = 58,
+ PIPE_FORMAT_R16G16B16A16_SNORM = 59,
+ PIPE_FORMAT_R16_SSCALED = 60,
+ PIPE_FORMAT_R16G16_SSCALED = 61,
+ PIPE_FORMAT_R16G16B16_SSCALED = 62,
+ PIPE_FORMAT_R16G16B16A16_SSCALED = 63,
+ PIPE_FORMAT_R8_UNORM = 64,
+ PIPE_FORMAT_R8G8_UNORM = 65,
+ PIPE_FORMAT_R8G8B8_UNORM = 66,
+ PIPE_FORMAT_R8G8B8A8_UNORM = 67,
+ PIPE_FORMAT_X8B8G8R8_UNORM = 68,
+ PIPE_FORMAT_R8_USCALED = 69,
+ PIPE_FORMAT_R8G8_USCALED = 70,
+ PIPE_FORMAT_R8G8B8_USCALED = 71,
+ PIPE_FORMAT_R8G8B8A8_USCALED = 72,
+ PIPE_FORMAT_R8_SNORM = 74,
+ PIPE_FORMAT_R8G8_SNORM = 75,
+ PIPE_FORMAT_R8G8B8_SNORM = 76,
+ PIPE_FORMAT_R8G8B8A8_SNORM = 77,
+ PIPE_FORMAT_R8_SSCALED = 82,
+ PIPE_FORMAT_R8G8_SSCALED = 83,
+ PIPE_FORMAT_R8G8B8_SSCALED = 84,
+ PIPE_FORMAT_R8G8B8A8_SSCALED = 85,
+ PIPE_FORMAT_R32_FIXED = 87,
+ PIPE_FORMAT_R32G32_FIXED = 88,
+ PIPE_FORMAT_R32G32B32_FIXED = 89,
+ PIPE_FORMAT_R32G32B32A32_FIXED = 90,
+ PIPE_FORMAT_R16_FLOAT = 91,
+ PIPE_FORMAT_R16G16_FLOAT = 92,
+ PIPE_FORMAT_R16G16B16_FLOAT = 93,
+ PIPE_FORMAT_R16G16B16A16_FLOAT = 94,
- /* mixed formats */
- PIPE_FORMAT_R8SG8SB8UX8U_NORM = 100,
- PIPE_FORMAT_R5SG5SB6U_NORM = 101,
+ /* sRGB formats */
+ PIPE_FORMAT_L8_SRGB = 95,
+ PIPE_FORMAT_L8A8_SRGB = 96,
+ PIPE_FORMAT_R8G8B8_SRGB = 97,
+ PIPE_FORMAT_A8B8G8R8_SRGB = 98,
+ PIPE_FORMAT_X8B8G8R8_SRGB = 99,
+ PIPE_FORMAT_B8G8R8A8_SRGB = 100,
+ PIPE_FORMAT_B8G8R8X8_SRGB = 101,
+ PIPE_FORMAT_A8R8G8B8_SRGB = 102,
+ PIPE_FORMAT_X8R8G8B8_SRGB = 103,
+ PIPE_FORMAT_R8G8B8A8_SRGB = 104,
/* compressed formats */
- PIPE_FORMAT_DXT1_RGB = 102,
- PIPE_FORMAT_DXT1_RGBA = 103,
- PIPE_FORMAT_DXT3_RGBA = 104,
- PIPE_FORMAT_DXT5_RGBA = 105,
+ PIPE_FORMAT_DXT1_RGB = 105,
+ PIPE_FORMAT_DXT1_RGBA = 106,
+ PIPE_FORMAT_DXT3_RGBA = 107,
+ PIPE_FORMAT_DXT5_RGBA = 108,
/* sRGB, compressed */
- PIPE_FORMAT_DXT1_SRGB = 106,
- PIPE_FORMAT_DXT1_SRGBA = 107,
- PIPE_FORMAT_DXT3_SRGBA = 108,
- PIPE_FORMAT_DXT5_SRGBA = 109,
+ PIPE_FORMAT_DXT1_SRGB = 109,
+ PIPE_FORMAT_DXT1_SRGBA = 110,
+ PIPE_FORMAT_DXT3_SRGBA = 111,
+ PIPE_FORMAT_DXT5_SRGBA = 112,
- PIPE_FORMAT_A8B8G8R8_UNORM = 110,
- PIPE_FORMAT_B5G5R5X1_UNORM = 111,
+ /* rgtc compressed */
+ PIPE_FORMAT_RGTC1_UNORM = 113,
+ PIPE_FORMAT_RGTC1_SNORM = 114,
+ PIPE_FORMAT_RGTC2_UNORM = 115,
+ PIPE_FORMAT_RGTC2_SNORM = 116,
+
+ PIPE_FORMAT_R8G8_B8G8_UNORM = 117,
+ PIPE_FORMAT_G8R8_G8B8_UNORM = 118,
+
+ /* mixed formats */
+ PIPE_FORMAT_R8SG8SB8UX8U_NORM = 119,
+ PIPE_FORMAT_R5SG5SB6U_NORM = 120,
+
+ PIPE_FORMAT_A8B8G8R8_UNORM = 121,
+ PIPE_FORMAT_B5G5R5X1_UNORM = 122,
+ PIPE_FORMAT_R10G10B10A2_USCALED = 123,
+ PIPE_FORMAT_R11G11B10_FLOAT = 124,
+ PIPE_FORMAT_R9G9B9E5_FLOAT = 125,
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UNORM = 126,
+ PIPE_FORMAT_R1_UNORM = 127,
PIPE_FORMAT_COUNT
};