#ifndef PIPE_DEFINES_H
#define PIPE_DEFINES_H
+#include "p_format.h"
+
#define PIPE_BLENDFACTOR_ONE 0x1
#define PIPE_BLENDFACTOR_SRC_COLOR 0x2
#define PIPE_BLENDFACTOR_SRC_ALPHA 0x3
#define PIPE_TEX_FACE_NEG_Z 5
#define PIPE_TEX_FACE_MAX 6
-
-/**
- * Texture/surface image formats (preliminary)
- */
-
-/* KW: Added lots of surface formats to support vertex element layout
- * definitions, and eventually render-to-vertex-buffer. Could
- * consider making float/int/uint/scaled/normalized a separate
- * parameter, but on the other hand there are special cases like
- * z24s8, compressed textures, ycbcr, etc that won't fit that model.
- */
-
-#define PIPE_FORMAT_NONE 0 /**< unstructured */
-#define PIPE_FORMAT_U_A8_R8_G8_B8 2 /**< ubyte[4] ARGB */
-#define PIPE_FORMAT_U_A1_R5_G5_B5 3 /**< 16-bit packed RGBA */
-#define PIPE_FORMAT_U_A4_R4_G4_B4 4 /**< 16-bit packed RGBA */
-#define PIPE_FORMAT_U_R5_G6_B5 5 /**< 16-bit packed RGB */
-#define PIPE_FORMAT_U_L8 6 /**< ubyte luminance */
-#define PIPE_FORMAT_U_A8 7 /**< ubyte alpha */
-#define PIPE_FORMAT_U_I8 8 /**< ubyte intensity */
-#define PIPE_FORMAT_U_A8_L8 9 /**< ubyte alpha, luminance */
-#define PIPE_FORMAT_S_R16_G16_B16_A16 10 /**< signed 16-bit RGBA (accum) */
-#define PIPE_FORMAT_YCBCR 11
-#define PIPE_FORMAT_YCBCR_REV 12
-#define PIPE_FORMAT_U_Z16 13 /**< ushort Z/depth */
-#define PIPE_FORMAT_U_Z32 14 /**< uint Z/depth */
-#define PIPE_FORMAT_F_Z32 15 /**< float Z/depth */
-#define PIPE_FORMAT_S8_Z24 16 /**< 8-bit stencil + 24-bit Z */
-#define PIPE_FORMAT_U_S8 17 /**< 8-bit stencil */
-#define PIPE_FORMAT_R64_FLOAT 0x20
-#define PIPE_FORMAT_R64G64_FLOAT 0x21
-#define PIPE_FORMAT_R64G64B64_FLOAT 0x22
-#define PIPE_FORMAT_R64G64B64A64_FLOAT 0x23
-#define PIPE_FORMAT_R32_FLOAT 0x24
-#define PIPE_FORMAT_R32G32_FLOAT 0x25
-#define PIPE_FORMAT_R32G32B32_FLOAT 0x26
-#define PIPE_FORMAT_R32G32B32A32_FLOAT 0x27
-#define PIPE_FORMAT_R32_UNORM 0x28
-#define PIPE_FORMAT_R32G32_UNORM 0x29
-#define PIPE_FORMAT_R32G32B32_UNORM 0x2a
-#define PIPE_FORMAT_R32G32B32A32_UNORM 0x2b
-#define PIPE_FORMAT_R32_USCALED 0x2c
-#define PIPE_FORMAT_R32G32_USCALED 0x2d
-#define PIPE_FORMAT_R32G32B32_USCALED 0x2e
-#define PIPE_FORMAT_R32G32B32A32_USCALED 0x2f
-#define PIPE_FORMAT_R32_SNORM 0x30
-#define PIPE_FORMAT_R32G32_SNORM 0x31
-#define PIPE_FORMAT_R32G32B32_SNORM 0x32
-#define PIPE_FORMAT_R32G32B32A32_SNORM 0x33
-#define PIPE_FORMAT_R32_SSCALED 0x34
-#define PIPE_FORMAT_R32G32_SSCALED 0x35
-#define PIPE_FORMAT_R32G32B32_SSCALED 0x36
-#define PIPE_FORMAT_R32G32B32A32_SSCALED 0x37
-#define PIPE_FORMAT_R16_UNORM 0x38
-#define PIPE_FORMAT_R16G16_UNORM 0x39
-#define PIPE_FORMAT_R16G16B16_UNORM 0x3a
-#define PIPE_FORMAT_R16G16B16A16_UNORM 0x3b
-#define PIPE_FORMAT_R16_USCALED 0x3c
-#define PIPE_FORMAT_R16G16_USCALED 0x3d
-#define PIPE_FORMAT_R16G16B16_USCALED 0x3e
-#define PIPE_FORMAT_R16G16B16A16_USCALED 0x3f
-#define PIPE_FORMAT_R16_SNORM 0x40
-#define PIPE_FORMAT_R16G16_SNORM 0x41
-#define PIPE_FORMAT_R16G16B16_SNORM 0x42
-#define PIPE_FORMAT_R16G16B16A16_SNORM 0x43
-#define PIPE_FORMAT_R16_SSCALED 0x44
-#define PIPE_FORMAT_R16G16_SSCALED 0x45
-#define PIPE_FORMAT_R16G16B16_SSCALED 0x46
-#define PIPE_FORMAT_R16G16B16A16_SSCALED 0x47
-#define PIPE_FORMAT_R8_UNORM 0x48
-#define PIPE_FORMAT_R8G8_UNORM 0x49
-#define PIPE_FORMAT_R8G8B8_UNORM 0x4a
-#define PIPE_FORMAT_R8G8B8A8_UNORM 0x4b
-#define PIPE_FORMAT_R8_USCALED 0x4c
-#define PIPE_FORMAT_R8G8_USCALED 0x4d
-#define PIPE_FORMAT_R8G8B8_USCALED 0x4e
-#define PIPE_FORMAT_R8G8B8A8_USCALED 0x4f
-#define PIPE_FORMAT_R8_SNORM 0x50
-#define PIPE_FORMAT_R8G8_SNORM 0x51
-#define PIPE_FORMAT_R8G8B8_SNORM 0x52
-#define PIPE_FORMAT_R8G8B8A8_SNORM 0x53
-#define PIPE_FORMAT_R8_SSCALED 0x54
-#define PIPE_FORMAT_R8G8_SSCALED 0x55
-#define PIPE_FORMAT_R8G8B8_SSCALED 0x56
-#define PIPE_FORMAT_R8G8B8A8_SSCALED 0x57
-
-#define PIPE_FORMAT_COUNT 0x58 /**< number of formats */
-
-/* Duplicated formats:
- */
-#define PIPE_FORMAT_U_R8_G8_B8_A8 PIPE_FORMAT_R8G8B8A8_UNORM
-
/**
* Surface flags
*/
--- /dev/null
+/**************************************************************************\r
+ * \r
+ * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.\r
+ * All Rights Reserved.\r
+ * \r
+ * Permission is hereby granted, free of charge, to any person obtaining a\r
+ * copy of this software and associated documentation files (the\r
+ * "Software"), to deal in the Software without restriction, including\r
+ * without limitation the rights to use, copy, modify, merge, publish,\r
+ * distribute, sub license, and/or sell copies of the Software, and to\r
+ * permit persons to whom the Software is furnished to do so, subject to\r
+ * the following conditions:\r
+ * \r
+ * The above copyright notice and this permission notice (including the\r
+ * next paragraph) shall be included in all copies or substantial portions\r
+ * of the Software.\r
+ * \r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\r
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR\r
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+ * \r
+ **************************************************************************/\r
+\r
+#ifndef PIPE_FORMAT_H\r
+#define PIPE_FORMAT_H\r
+\r
+#include "p_compiler.h"\r
+\r
+#define PIPE_FORMAT_LAYOUT_RGBAZS 0\r
+#define PIPE_FORMAT_LAYOUT_YCBCR 1\r
+\r
+#define PIPE_FORMAT_COMP_R 0\r
+#define PIPE_FORMAT_COMP_G 1\r
+#define PIPE_FORMAT_COMP_B 2\r
+#define PIPE_FORMAT_COMP_A 3\r
+#define PIPE_FORMAT_COMP_0 4\r
+#define PIPE_FORMAT_COMP_1 5\r
+#define PIPE_FORMAT_COMP_Z 6\r
+#define PIPE_FORMAT_COMP_S 7\r
+\r
+#define PIPE_FORMAT_TYPE_UNKNOWN 0\r
+#define PIPE_FORMAT_TYPE_FLOAT 1\r
+#define PIPE_FORMAT_TYPE_UNORM 2\r
+#define PIPE_FORMAT_TYPE_SNORM 3\r
+#define PIPE_FORMAT_TYPE_USCALED 4\r
+#define PIPE_FORMAT_TYPE_SSCALED 5\r
+\r
+struct pipe_format_header\r
+{\r
+ uint layout : 2; /**< PIPE_FORMAT_LAYOUT_ */\r
+ uint padding : 30;\r
+};\r
+\r
+/**\r
+ * RGBAZS Format Layout.\r
+ */\r
+struct pipe_format_rgbazs\r
+{\r
+ uint layout : 2; /**< PIPE_FORMAT_LAYOUT_RGBAZS */\r
+ uint swizzleX : 3; /**< PIPE_FORMAT_COMP_ */\r
+ uint swizzleY : 3; /**< PIPE_FORMAT_COMP_ */\r
+ uint swizzleZ : 3; /**< PIPE_FORMAT_COMP_ */\r
+ uint swizzleW : 3; /**< PIPE_FORMAT_COMP_ */\r
+ uint sizeX : 3; /**< Size of X - 1 */\r
+ uint sizeY : 3; /**< Size of Y - 1 */\r
+ uint sizeZ : 3; /**< Size of Z - 1 */\r
+ uint sizeW : 3; /**< Size of W - 1 */\r
+ uint exp8 : 2; /**< Scale size by 8 ^ exp8 */\r
+ uint type : 3; /**< PIPE_FORMAT_TYPE_ */\r
+ uint padding : 1;\r
+};\r
+\r
+#define _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, EXP8, TYPE ) (\\r
+ (PIPE_FORMAT_LAYOUT_RGBAZS << 0) |\\r
+ ((SWZ) << 2) |\\r
+ ((SIZEX) << 14) |\\r
+ ((SIZEY) << 17) |\\r
+ ((SIZEZ) << 20) |\\r
+ ((SIZEW) << 23) |\\r
+ ((EXP8) << 26) |\\r
+ ((TYPE) << 28) )\r
+\r
+#define _PIPE_FORMAT_SWZ( SWZX, SWZY, SWZZ, SWZW ) (((SWZX) << 2) | ((SWZY) << 5) | ((SWZZ) << 8) | ((SWZW) << 11))\r
+\r
+#define _PIPE_FORMAT_RGBAZS_1U( SWZ, SIZE, TYPE )\\r
+ _PIPE_FORMAT_RGBAZS( SWZ, SIZE, SIZE, SIZE, SIZE, 0, TYPE )\r
+\r
+#define _PIPE_FORMAT_RGBAZS_1N( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE )\\r
+ _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 0, TYPE )\r
+\r
+#define _PIPE_FORMAT_RGBAZS_8U( SWZ, SIZE, TYPE )\\r
+ _PIPE_FORMAT_RGBAZS( SWZ, SIZE, SIZE, SIZE, SIZE, 1, TYPE )\r
+\r
+#define _PIPE_FORMAT_RGBAZS_8N( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE )\\r
+ _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 1, TYPE )\r
+\r
+#define _PIPE_FORMAT_RGBAZS_64( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, TYPE )\\r
+ _PIPE_FORMAT_RGBAZS( SWZ, SIZEX, SIZEY, SIZEZ, SIZEW, 2, TYPE )\r
+\r
+#define _PIPE_FORMAT_R000 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )\r
+#define _PIPE_FORMAT_RG00 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_A )\r
+#define _PIPE_FORMAT_RGB0 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_A )\r
+#define _PIPE_FORMAT_RGBA _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B, PIPE_FORMAT_COMP_A )\r
+#define _PIPE_FORMAT_ARGB _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_A, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G, PIPE_FORMAT_COMP_B )\r
+#define _PIPE_FORMAT_0000 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )\r
+#define _PIPE_FORMAT_000R _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_R )\r
+#define _PIPE_FORMAT_RRR1 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_1 )\r
+#define _PIPE_FORMAT_RRRR _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R )\r
+#define _PIPE_FORMAT_RRRG _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_R, PIPE_FORMAT_COMP_G )\r
+#define _PIPE_FORMAT_Z000 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )\r
+#define _PIPE_FORMAT_SZ00 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_Z, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )\r
+#define _PIPE_FORMAT_S000 _PIPE_FORMAT_SWZ( PIPE_FORMAT_COMP_S, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0, PIPE_FORMAT_COMP_0 )\r
+\r
+struct pipe_format_ycbcr\r
+{\r
+ uint layout : 2; /**< PIPE_FORMAT_LAYOUT_YCBCR */\r
+ uint reversed : 1;\r
+ uint padding : 29;\r
+};\r
+\r
+#define _PIPE_FORMAT_YCBCR( REV ) (\\r
+ (PIPE_FORMAT_LAYOUT_YCBCR << 0) |\\r
+ ((REVERSED) << 2) )\r
+\r
+union pipe_format\r
+{\r
+ uint value32;\r
+ struct pipe_format_header header;\r
+ struct pipe_format_rgbazs rgbazs;\r
+ struct pipe_format_ycbcr ycbcr;\r
+};\r
+\r
+/**\r
+ * Texture/surface image formats (preliminary)\r
+ */\r
+\r
+/* KW: Added lots of surface formats to support vertex element layout\r
+ * definitions, and eventually render-to-vertex-buffer. Could\r
+ * consider making float/int/uint/scaled/normalized a separate\r
+ * parameter, but on the other hand there are special cases like\r
+ * z24s8, compressed textures, ycbcr, etc that won't fit that model.\r
+ */\r
+\r
+#define PIPE_FORMAT_NONE _PIPE_FORMAT_RGBAZS_1U( _PIPE_FORMAT_0000, 0, PIPE_FORMAT_TYPE_UNKNOWN ) /**< unstructured */\r
+#define PIPE_FORMAT_U_A8_R8_G8_B8 _PIPE_FORMAT_RGBAZS_8U( _PIPE_FORMAT_ARGB, 1, PIPE_FORMAT_TYPE_UNORM ) /**< ubyte[4] ARGB */\r
+#define PIPE_FORMAT_U_A1_R5_G5_B5 _PIPE_FORMAT_RGBAZS_1N( _PIPE_FORMAT_ARGB, 1, 5, 5, 5, PIPE_FORMAT_TYPE_UNORM ) /**< 16-bit packed RGBA */\r
+#define PIPE_FORMAT_U_A4_R4_G4_B4 _PIPE_FORMAT_RGBAZS_1U( _PIPE_FORMAT_ARGB, 4, PIPE_FORMAT_TYPE_UNORM ) /**< 16-bit packed RGBA */\r
+#define PIPE_FORMAT_U_R5_G6_B5 _PIPE_FORMAT_RGBAZS_1N( _PIPE_FORMAT_RGB0, 5, 6, 5, 0, PIPE_FORMAT_TYPE_UNORM ) /**< 16-bit packed RGB */\r
+#define PIPE_FORMAT_U_L8 _PIPE_FORMAT_RGBAZS_8U( _PIPE_FORMAT_RRR1, 1, PIPE_FORMAT_TYPE_UNORM ) /**< ubyte luminance */\r
+#define PIPE_FORMAT_U_A8 _PIPE_FORMAT_RGBAZS_8U( _PIPE_FORMAT_000R, 1, PIPE_FORMAT_TYPE_UNORM ) /**< ubyte alpha */\r
+#define PIPE_FORMAT_U_I8 _PIPE_FORMAT_RGBAZS_8U( _PIPE_FORMAT_RRRR, 1, PIPE_FORMAT_TYPE_UNORM ) /**< ubyte intensity */\r
+#define PIPE_FORMAT_U_A8_L8 _PIPE_FORMAT_RGBAZS_8U( _PIPE_FORMAT_RRRG, 1, PIPE_FORMAT_TYPE_UNORM ) /**< ubyte alpha, luminance */\r
+#define PIPE_FORMAT_S_R16_G16_B16_A16 _PIPE_FORMAT_RGBAZS_8U( _PIPE_FORMAT_RGBA, 2, PIPE_FORMAT_TYPE_SNORM ) /**< signed 16-bit RGBA (accum) */\r
+#define PIPE_FORMAT_YCBCR _PIPE_FORMAT_YCBCR( 0 )\r
+#define PIPE_FORMAT_YCBCR_REV _PIPE_FORMAT_YCBCR( 1 )\r
+#define PIPE_FORMAT_U_Z16 _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_Z000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ) /**< ushort Z/depth */\r
+#define PIPE_FORMAT_U_Z32 _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ) /**< uint Z/depth */\r
+#define PIPE_FORMAT_F_Z32 _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_Z000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT ) /**< float Z/depth */\r
+#define PIPE_FORMAT_S8_Z24 _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_SZ00, 1, 3, 0, 0, PIPE_FORMAT_TYPE_UNORM ) /**< 8-bit stencil + 24-bit Z */\r
+#define PIPE_FORMAT_U_S8 _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_S000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM ) /**< 8-bit stencil */\r
+#define PIPE_FORMAT_R64_FLOAT _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_R000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R64G64_FLOAT _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RG00, 1, 1, 0, 0, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R64G64B64_FLOAT _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGB0, 1, 1, 1, 0, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R64G64B64A64_FLOAT _PIPE_FORMAT_RGBAZS_64( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R32_FLOAT _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R32G32_FLOAT _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 4, 4, 0, 0, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R32G32B32_FLOAT _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 4, 4, 4, 0, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R32G32B32A32_FLOAT _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_FLOAT )\r
+#define PIPE_FORMAT_R32_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R32G32_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 4, 4, 0, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R32G32B32_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 4, 4, 4, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R32G32B32A32_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R32_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R32G32_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 4, 4, 0, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R32G32B32_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 4, 4, 4, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R32G32B32A32_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R32_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R32G32_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R32G32B32_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R32G32B32A32_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R32_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 4, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R32G32_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 4, 4, 0, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R32G32B32_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 4, 4, 4, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R32G32B32A32_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 4, 4, 4, 4, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R16_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R16G16_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 2, 2, 0, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R16G16B16_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 2, 2, 2, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R16G16B16A16_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R16_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R16G16_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 2, 2, 0, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R16G16B16_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 2, 2, 2, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R16G16B16A16_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R16_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R16G16_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R16G16B16_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R16G16B16A16_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R16_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 2, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R16G16_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 2, 2, 0, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R16G16B16_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 2, 2, 2, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R16G16B16A16_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 2, 2, 2, 2, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R8_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R8G8_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 1, 1, 0, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R8G8B8_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 1, 1, 1, 0, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R8G8B8A8_UNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_UNORM )\r
+#define PIPE_FORMAT_R8_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R8G8_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 1, 1, 0, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R8G8B8_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 1, 1, 1, 0, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R8G8B8A8_USCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_USCALED )\r
+#define PIPE_FORMAT_R8_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R8G8_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R8G8B8_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R8G8B8A8_SNORM _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SNORM )\r
+#define PIPE_FORMAT_R8_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_R000, 1, 0, 0, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R8G8_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RG00, 1, 1, 0, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R8G8B8_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGB0, 1, 1, 1, 0, PIPE_FORMAT_TYPE_SSCALED )\r
+#define PIPE_FORMAT_R8G8B8A8_SSCALED _PIPE_FORMAT_RGBAZS_8N( _PIPE_FORMAT_RGBA, 1, 1, 1, 1, PIPE_FORMAT_TYPE_SSCALED )\r
+\r
+/* Duplicated formats:
+ */
+#define PIPE_FORMAT_U_R8_G8_B8_A8 PIPE_FORMAT_R8G8B8A8_UNORM\r
+\r
+#endif\r