mesa: Redefine MESA_FORMAT_* in terms of PIPE_FORMAT_*.
authorEric Anholt <eric@anholt.net>
Fri, 6 Sep 2019 20:26:15 +0000 (13:26 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 7 Nov 2019 19:43:41 +0000 (19:43 +0000)
There are various places in Mesa where we would like to be able to
have a shared format enum between Mesa and gallium (NIR compiler's
image formats, for example, or mapping from gallium's formats to
mesa's and vice versa in st_format.c).  Rewriting all MESA_FORMAT to
PIPE_FORMAT would be disruptive and possibly more work than it's worth
(And I actually prefer MESA_FORMAT's name scheme), so for now just
make it so that there's one shared set of enum values.

The #defines here were generated by printing out from the
tests/st_format.c round-tripping loop, with the exception of 8888
formats where I hand-edited the #defines to point at the corresponding
gallium packed format define.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/formats.h

index ad6452334123a00763a21adf23afb5c11a644464..8d020ebc5e500e685c8a5f17f7c7057b51ae0855 100644 (file)
@@ -36,6 +36,7 @@
 #include <GL/gl.h>
 #include <stdbool.h>
 #include <stdint.h>
+#include "gallium/include/pipe/p_format.h"
 #include "util/u_endian.h"
 
 #ifdef __cplusplus
@@ -237,11 +238,10 @@ _mesa_format_is_mesa_array_format(uint32_t f)
 }
 
 /**
- * Mesa texture/renderbuffer image formats.
+ * Mesa texture/renderbuffer image formats.  These are just other names of the
+ * gallium p_format.h formats.
  */
-typedef enum
-{
-   MESA_FORMAT_NONE = 0,
+typedef enum pipe_format mesa_format;
 
    /**
     * \name Basic hardware formats
@@ -348,331 +348,273 @@ typedef enum
     *
     */
 
-   /* Packed unorm formats */    /* msb <------ TEXEL BITS -----------> lsb */
-                                 /* ---- ---- ---- ---- ---- ---- ---- ---- */
-   MESA_FORMAT_A8B8G8R8_UNORM,   /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
-   MESA_FORMAT_X8B8G8R8_UNORM,   /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
-   MESA_FORMAT_R8G8B8A8_UNORM,   /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_R8G8B8X8_UNORM,   /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_B8G8R8A8_UNORM,   /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_B8G8R8X8_UNORM,   /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_A8R8G8B8_UNORM,   /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
-   MESA_FORMAT_X8R8G8B8_UNORM,   /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
-   MESA_FORMAT_B5G6R5_UNORM,                         /* RRRR RGGG GGGB BBBB */
-   MESA_FORMAT_R5G6B5_UNORM,                         /* BBBB BGGG GGGR RRRR */
-   MESA_FORMAT_B4G4R4A4_UNORM,                       /* AAAA RRRR GGGG BBBB */
-   MESA_FORMAT_B4G4R4X4_UNORM,                       /* xxxx RRRR GGGG BBBB */
-   MESA_FORMAT_A4R4G4B4_UNORM,                       /* BBBB GGGG RRRR AAAA */
-   MESA_FORMAT_A1B5G5R5_UNORM,                       /* RRRR RGGG GGBB BBBA */
-   MESA_FORMAT_X1B5G5R5_UNORM,                       /* BBBB BGGG GGRR RRRX */
-   MESA_FORMAT_B5G5R5A1_UNORM,                       /* ARRR RRGG GGGB BBBB */
-   MESA_FORMAT_B5G5R5X1_UNORM,                       /* xRRR RRGG GGGB BBBB */
-   MESA_FORMAT_A1R5G5B5_UNORM,                       /* BBBB BGGG GGRR RRRA */
-   MESA_FORMAT_L4A4_UNORM,                                     /* AAAA LLLL */
-   MESA_FORMAT_B2G3R3_UNORM,                                   /* RRRG GGBB */
-
-   MESA_FORMAT_B10G10R10A2_UNORM,/* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
-   MESA_FORMAT_B10G10R10X2_UNORM,/* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
-   MESA_FORMAT_R10G10B10A2_UNORM,/* AABB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */
-   MESA_FORMAT_R10G10B10X2_UNORM,/* xxBB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */
-
-   MESA_FORMAT_S8_UINT_Z24_UNORM,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
-   MESA_FORMAT_X8_UINT_Z24_UNORM,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
-   MESA_FORMAT_Z24_UNORM_S8_UINT,/* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
-   MESA_FORMAT_Z24_UNORM_X8_UINT,/* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
-
-   /* Other formats */
-   MESA_FORMAT_R3G3B2_UNORM,                                   /* BBGG GRRR */
-   MESA_FORMAT_A4B4G4R4_UNORM,                       /* RRRR GGGG BBBB AAAA */
-   MESA_FORMAT_R4G4B4A4_UNORM,                       /* AAAA BBBB GGGG RRRR */
-   MESA_FORMAT_R5G5B5A1_UNORM,                       /* ABBB BBGG GGGR RRRR */
-   MESA_FORMAT_A2B10G10R10_UNORM,/* RRRR RRRR RRGG GGGG GGGG BBBB BBBB BBAA */
-   MESA_FORMAT_A2R10G10B10_UNORM,/* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRAA */
-
-   MESA_FORMAT_YCBCR,            /*                     YYYY YYYY UorV UorV */
-   MESA_FORMAT_YCBCR_REV,        /*                     UorV UorV YYYY YYYY */
-
-   /* Array unorm formats */
-   MESA_FORMAT_A_UNORM8,      /* ubyte[i] = A */
-   MESA_FORMAT_A_UNORM16,     /* ushort[i] = A */
-   MESA_FORMAT_L_UNORM8,      /* ubyte[i] = L */
-   MESA_FORMAT_L_UNORM16,     /* ushort[i] = L */
-   MESA_FORMAT_LA_UNORM8,     /* ubyte[i * 2] = L, ubyte[*2+1] = A */
-   MESA_FORMAT_LA_UNORM16,    /* ushort[i * 2] = L, ushort[i*2+1] = A */
-   MESA_FORMAT_I_UNORM8,      /* ubyte[i] = I */
-   MESA_FORMAT_I_UNORM16,     /* ushort[i] = I */
-   MESA_FORMAT_R_UNORM8,      /* ubyte[i] = R */
-   MESA_FORMAT_R_UNORM16,     /* ushort[i] = R */
-   MESA_FORMAT_RG_UNORM8,     /* ubyte[i * 2] = R, [i * 2 + 1] = G */
-   MESA_FORMAT_RG_UNORM16,    /* ushort[i * 2] = R, [i * 2 + 1] = G */
-   MESA_FORMAT_BGR_UNORM8,    /* ubyte[i*3] = B, [i*3+1] = G, [i*3+2] = R */
-   MESA_FORMAT_RGB_UNORM8,    /* ubyte[i*3] = R, [i*3+1] = G, [i*3+2] = B */
-   MESA_FORMAT_RGBA_UNORM16,  /* ushort[i] = R, [1] = G, [2] = B, [3] = A */
-   MESA_FORMAT_RGBX_UNORM16,  
-
-   MESA_FORMAT_Z_UNORM16,     /* ushort[i] = Z */
-   MESA_FORMAT_Z_UNORM32,     /* uint[i] = Z */
-   MESA_FORMAT_S_UINT8,       /* ubyte[i] = S */
-
-   /* Packed signed/normalized formats */
-                                 /* msb <------ TEXEL BITS -----------> lsb */
-                                 /* ---- ---- ---- ---- ---- ---- ---- ---- */
-   MESA_FORMAT_A8B8G8R8_SNORM,   /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
-   MESA_FORMAT_X8B8G8R8_SNORM,   /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
-   MESA_FORMAT_R8G8B8A8_SNORM,   /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_R8G8B8X8_SNORM,   /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
-
-   /* Array signed/normalized formats */
-   MESA_FORMAT_A_SNORM8,      /* byte[i] = A */
-   MESA_FORMAT_A_SNORM16,     /* short[i] = A */
-   MESA_FORMAT_L_SNORM8,      /* byte[i] = L */
-   MESA_FORMAT_L_SNORM16,     /* short[i] = L */
-   MESA_FORMAT_I_SNORM8,      /* byte[i] = I */
-   MESA_FORMAT_I_SNORM16,     /* short[i] = I */
-   MESA_FORMAT_R_SNORM8,      /* byte[i] = R */
-   MESA_FORMAT_R_SNORM16,     /* short[i] = R */
-   MESA_FORMAT_LA_SNORM8,     /* byte[i * 2] = L, [i * 2 + 1] = A */
-   MESA_FORMAT_LA_SNORM16,    /* short[i * 2] = L, [i * 2 + 1] = A */
-   MESA_FORMAT_RG_SNORM8,     /* byte[i * 2] = R, [i * 2 + 1] = G */
-   MESA_FORMAT_RG_SNORM16,    /* short[i * 2] = R, [i * 2 + 1] = G */
-   MESA_FORMAT_RGB_SNORM16,   /* short[i*3] = R, [i*3+1] = G, [i*3+2] = B */
-   MESA_FORMAT_RGBA_SNORM16,  /* ... */
-   MESA_FORMAT_RGBX_SNORM16,  /* ... */
-
-   /* Packed sRGB formats */
-   MESA_FORMAT_A8B8G8R8_SRGB,    /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
-   MESA_FORMAT_B8G8R8A8_SRGB,    /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_A8R8G8B8_SRGB,    /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
-   MESA_FORMAT_B8G8R8X8_SRGB,    /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_X8R8G8B8_SRGB,    /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
-   MESA_FORMAT_R8G8B8A8_SRGB,    /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_R8G8B8X8_SRGB,    /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_X8B8G8R8_SRGB,    /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
-   MESA_FORMAT_R_SRGB8,          /* RRRR RRRR */
-
-   /* Array sRGB formats */
-   MESA_FORMAT_L_SRGB8,       /* ubyte[i] = L */
-   MESA_FORMAT_LA_SRGB8,      /* ubyte[i*2] = L, [i*2+1] = A */
-   MESA_FORMAT_BGR_SRGB8,     /* ubyte[i*3] = B, [i*3+1] = G, [i*3+2] = R */
-
-   /* Packed float formats */
-   MESA_FORMAT_R9G9B9E5_FLOAT,
-   MESA_FORMAT_R11G11B10_FLOAT,   /* BBBB BBBB BBGG GGGG GGGG GRRR RRRR RRRR */
-   MESA_FORMAT_Z32_FLOAT_S8X24_UINT, /* (float, x24s8) */
-
-   /* Array float formats */
-   MESA_FORMAT_A_FLOAT16,
-   MESA_FORMAT_A_FLOAT32,
-   MESA_FORMAT_L_FLOAT16,
-   MESA_FORMAT_L_FLOAT32,
-   MESA_FORMAT_LA_FLOAT16,
-   MESA_FORMAT_LA_FLOAT32,
-   MESA_FORMAT_I_FLOAT16,
-   MESA_FORMAT_I_FLOAT32,
-   MESA_FORMAT_R_FLOAT16,
-   MESA_FORMAT_R_FLOAT32,
-   MESA_FORMAT_RG_FLOAT16,
-   MESA_FORMAT_RG_FLOAT32,
-   MESA_FORMAT_RGB_FLOAT16,
-   MESA_FORMAT_RGB_FLOAT32,
-   MESA_FORMAT_RGBA_FLOAT16,
-   MESA_FORMAT_RGBA_FLOAT32,  /* float[0] = R, [1] = G, [2] = B, [3] = A */
-   MESA_FORMAT_RGBX_FLOAT16,
-   MESA_FORMAT_RGBX_FLOAT32,
-   MESA_FORMAT_Z_FLOAT32,
-
-   /* Packed signed/unsigned non-normalized integer formats */
-
-   MESA_FORMAT_A8B8G8R8_UINT,    /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
-   MESA_FORMAT_A8R8G8B8_UINT,    /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
-   MESA_FORMAT_R8G8B8A8_UINT,    /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
-   MESA_FORMAT_B8G8R8A8_UINT,    /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
-   MESA_FORMAT_B10G10R10A2_UINT, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
-   MESA_FORMAT_R10G10B10A2_UINT, /* AABB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */
-   MESA_FORMAT_A2B10G10R10_UINT, /* RRRR RRRR RRGG GGGG GGGG BBBB BBBB BBAA */
-   MESA_FORMAT_A2R10G10B10_UINT, /* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRAA */
-   MESA_FORMAT_B5G6R5_UINT,                          /* RRRR RGGG GGGB BBBB */
-   MESA_FORMAT_R5G6B5_UINT,                          /* BBBB BGGG GGGR RRRR */
-   MESA_FORMAT_B2G3R3_UINT,                                    /* RRRG GGBB */
-   MESA_FORMAT_R3G3B2_UINT,                                    /* BBGG GRRR */
-   MESA_FORMAT_A4B4G4R4_UINT,                        /* RRRR GGGG BBBB AAAA */
-   MESA_FORMAT_R4G4B4A4_UINT,                        /* AAAA BBBB GGGG RRRR */
-   MESA_FORMAT_B4G4R4A4_UINT,                        /* AAAA RRRR GGGG BBBB */
-   MESA_FORMAT_A4R4G4B4_UINT,                        /* BBBB GGGG RRRR AAAA */
-   MESA_FORMAT_A1B5G5R5_UINT,                        /* RRRR RGGG GGBB BBBA */
-   MESA_FORMAT_B5G5R5A1_UINT,                        /* ARRR RRGG GGGB BBBB */
-   MESA_FORMAT_A1R5G5B5_UINT,                        /* BBBB BGGG GGRR RRRA */
-   MESA_FORMAT_R5G5B5A1_UINT,                        /* ABBB BBGG GGGR RRRR */
-
-   /* Array signed/unsigned non-normalized integer formats */
-   MESA_FORMAT_A_UINT8,
-   MESA_FORMAT_A_UINT16,
-   MESA_FORMAT_A_UINT32,
-   MESA_FORMAT_A_SINT8,
-   MESA_FORMAT_A_SINT16,
-   MESA_FORMAT_A_SINT32,
-
-   MESA_FORMAT_I_UINT8,
-   MESA_FORMAT_I_UINT16,
-   MESA_FORMAT_I_UINT32,
-   MESA_FORMAT_I_SINT8,
-   MESA_FORMAT_I_SINT16,
-   MESA_FORMAT_I_SINT32,
-
-   MESA_FORMAT_L_UINT8,
-   MESA_FORMAT_L_UINT16,
-   MESA_FORMAT_L_UINT32,
-   MESA_FORMAT_L_SINT8,
-   MESA_FORMAT_L_SINT16,
-   MESA_FORMAT_L_SINT32,
-
-   MESA_FORMAT_LA_UINT8,
-   MESA_FORMAT_LA_UINT16,
-   MESA_FORMAT_LA_UINT32,
-   MESA_FORMAT_LA_SINT8,
-   MESA_FORMAT_LA_SINT16,
-   MESA_FORMAT_LA_SINT32,
-
-   MESA_FORMAT_R_UINT8,
-   MESA_FORMAT_R_UINT16,
-   MESA_FORMAT_R_UINT32,
-   MESA_FORMAT_R_SINT8,
-   MESA_FORMAT_R_SINT16,
-   MESA_FORMAT_R_SINT32,
-
-   MESA_FORMAT_RG_UINT8,
-   MESA_FORMAT_RG_UINT16,
-   MESA_FORMAT_RG_UINT32,
-   MESA_FORMAT_RG_SINT8,
-   MESA_FORMAT_RG_SINT16,
-   MESA_FORMAT_RG_SINT32,
-
-   MESA_FORMAT_RGB_UINT8,
-   MESA_FORMAT_RGB_UINT16,
-   MESA_FORMAT_RGB_UINT32,
-   MESA_FORMAT_RGB_SINT8,
-   MESA_FORMAT_RGB_SINT16,
-   MESA_FORMAT_RGB_SINT32,
-
-   MESA_FORMAT_RGBA_UINT16,
-   MESA_FORMAT_RGBA_UINT32,
-   MESA_FORMAT_RGBA_SINT8,
-   MESA_FORMAT_RGBA_SINT16,
-   MESA_FORMAT_RGBA_SINT32,
-
-   MESA_FORMAT_RGBX_UINT8,
-   MESA_FORMAT_RGBX_UINT16,
-   MESA_FORMAT_RGBX_UINT32,
-   MESA_FORMAT_RGBX_SINT8,
-   MESA_FORMAT_RGBX_SINT16,
-   MESA_FORMAT_RGBX_SINT32,
-
-   /* DXT compressed formats */
-   MESA_FORMAT_RGB_DXT1,
-   MESA_FORMAT_RGBA_DXT1,
-   MESA_FORMAT_RGBA_DXT3,
-   MESA_FORMAT_RGBA_DXT5,
-
-   /* DXT sRGB compressed formats */
-   MESA_FORMAT_SRGB_DXT1,
-   MESA_FORMAT_SRGBA_DXT1,
-   MESA_FORMAT_SRGBA_DXT3,
-   MESA_FORMAT_SRGBA_DXT5,
-
-   /* FXT1 compressed formats */
-   MESA_FORMAT_RGB_FXT1,
-   MESA_FORMAT_RGBA_FXT1,
-
-   /* RGTC compressed formats */
-   MESA_FORMAT_R_RGTC1_UNORM,
-   MESA_FORMAT_R_RGTC1_SNORM,
-   MESA_FORMAT_RG_RGTC2_UNORM,
-   MESA_FORMAT_RG_RGTC2_SNORM,
-
-   /* LATC1/2 compressed formats */
-   MESA_FORMAT_L_LATC1_UNORM,
-   MESA_FORMAT_L_LATC1_SNORM,
-   MESA_FORMAT_LA_LATC2_UNORM,
-   MESA_FORMAT_LA_LATC2_SNORM,
-
-   /* ETC1/2 compressed formats */
-   MESA_FORMAT_ETC1_RGB8,
-   MESA_FORMAT_ETC2_RGB8,
-   MESA_FORMAT_ETC2_SRGB8,
-   MESA_FORMAT_ETC2_RGBA8_EAC,
-   MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC,
-   MESA_FORMAT_ETC2_R11_EAC,
-   MESA_FORMAT_ETC2_RG11_EAC,
-   MESA_FORMAT_ETC2_SIGNED_R11_EAC,
-   MESA_FORMAT_ETC2_SIGNED_RG11_EAC,
-   MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1,
-   MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1,
-
-   /* BPTC compressed formats */
-   MESA_FORMAT_BPTC_RGBA_UNORM,
-   MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM,
-   MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT,
-   MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT,
-
-   /* ASTC compressed formats */
-   MESA_FORMAT_RGBA_ASTC_4x4,
-   MESA_FORMAT_RGBA_ASTC_5x4,
-   MESA_FORMAT_RGBA_ASTC_5x5,
-   MESA_FORMAT_RGBA_ASTC_6x5,
-   MESA_FORMAT_RGBA_ASTC_6x6,
-   MESA_FORMAT_RGBA_ASTC_8x5,
-   MESA_FORMAT_RGBA_ASTC_8x6,
-   MESA_FORMAT_RGBA_ASTC_8x8,
-   MESA_FORMAT_RGBA_ASTC_10x5,
-   MESA_FORMAT_RGBA_ASTC_10x6,
-   MESA_FORMAT_RGBA_ASTC_10x8,
-   MESA_FORMAT_RGBA_ASTC_10x10,
-   MESA_FORMAT_RGBA_ASTC_12x10,
-   MESA_FORMAT_RGBA_ASTC_12x12,
-
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12,
-
-   MESA_FORMAT_RGBA_ASTC_3x3x3,
-   MESA_FORMAT_RGBA_ASTC_4x3x3,
-   MESA_FORMAT_RGBA_ASTC_4x4x3,
-   MESA_FORMAT_RGBA_ASTC_4x4x4,
-   MESA_FORMAT_RGBA_ASTC_5x4x4,
-   MESA_FORMAT_RGBA_ASTC_5x5x4,
-   MESA_FORMAT_RGBA_ASTC_5x5x5,
-   MESA_FORMAT_RGBA_ASTC_6x5x5,
-   MESA_FORMAT_RGBA_ASTC_6x6x5,
-   MESA_FORMAT_RGBA_ASTC_6x6x6,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5,
-   MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6,
-
-   /* ATC compressed formats */
-   MESA_FORMAT_ATC_RGB,
-   MESA_FORMAT_ATC_RGBA_EXPLICIT,
-   MESA_FORMAT_ATC_RGBA_INTERPOLATED,
-
-   MESA_FORMAT_COUNT
-} mesa_format;
+#define MESA_FORMAT_NONE                         PIPE_FORMAT_NONE
+#define MESA_FORMAT_A8B8G8R8_UNORM               PIPE_FORMAT_ABGR8888_UNORM
+#define MESA_FORMAT_X8B8G8R8_UNORM               PIPE_FORMAT_XBGR8888_UNORM
+#define MESA_FORMAT_R8G8B8A8_UNORM               PIPE_FORMAT_RGBA8888_UNORM
+#define MESA_FORMAT_R8G8B8X8_UNORM               PIPE_FORMAT_RGBX8888_UNORM
+#define MESA_FORMAT_B8G8R8A8_UNORM               PIPE_FORMAT_BGRA8888_UNORM
+#define MESA_FORMAT_B8G8R8X8_UNORM               PIPE_FORMAT_BGRX8888_UNORM
+#define MESA_FORMAT_A8R8G8B8_UNORM               PIPE_FORMAT_ARGB8888_UNORM
+#define MESA_FORMAT_X8R8G8B8_UNORM               PIPE_FORMAT_XRGB8888_UNORM
+#define MESA_FORMAT_B5G6R5_UNORM                 PIPE_FORMAT_B5G6R5_UNORM
+#define MESA_FORMAT_R5G6B5_UNORM                 PIPE_FORMAT_R5G6B5_UNORM
+#define MESA_FORMAT_B4G4R4A4_UNORM               PIPE_FORMAT_B4G4R4A4_UNORM
+#define MESA_FORMAT_B4G4R4X4_UNORM               PIPE_FORMAT_B4G4R4X4_UNORM
+#define MESA_FORMAT_A4R4G4B4_UNORM               PIPE_FORMAT_A4R4G4B4_UNORM
+#define MESA_FORMAT_A1B5G5R5_UNORM               PIPE_FORMAT_A1B5G5R5_UNORM
+#define MESA_FORMAT_X1B5G5R5_UNORM               PIPE_FORMAT_X1B5G5R5_UNORM
+#define MESA_FORMAT_B5G5R5A1_UNORM               PIPE_FORMAT_B5G5R5A1_UNORM
+#define MESA_FORMAT_B5G5R5X1_UNORM               PIPE_FORMAT_B5G5R5X1_UNORM
+#define MESA_FORMAT_A1R5G5B5_UNORM               PIPE_FORMAT_A1R5G5B5_UNORM
+#define MESA_FORMAT_L4A4_UNORM                   PIPE_FORMAT_L4A4_UNORM
+#define MESA_FORMAT_B2G3R3_UNORM                 PIPE_FORMAT_B2G3R3_UNORM
+#define MESA_FORMAT_B10G10R10A2_UNORM            PIPE_FORMAT_B10G10R10A2_UNORM
+#define MESA_FORMAT_B10G10R10X2_UNORM            PIPE_FORMAT_B10G10R10X2_UNORM
+#define MESA_FORMAT_R10G10B10A2_UNORM            PIPE_FORMAT_R10G10B10A2_UNORM
+#define MESA_FORMAT_R10G10B10X2_UNORM            PIPE_FORMAT_R10G10B10X2_UNORM
+#define MESA_FORMAT_S8_UINT_Z24_UNORM            PIPE_FORMAT_S8_UINT_Z24_UNORM
+#define MESA_FORMAT_X8_UINT_Z24_UNORM            PIPE_FORMAT_X8Z24_UNORM
+#define MESA_FORMAT_Z24_UNORM_S8_UINT            PIPE_FORMAT_Z24_UNORM_S8_UINT
+#define MESA_FORMAT_Z24_UNORM_X8_UINT            PIPE_FORMAT_Z24X8_UNORM
+#define MESA_FORMAT_R3G3B2_UNORM                 PIPE_FORMAT_R3G3B2_UNORM
+#define MESA_FORMAT_A4B4G4R4_UNORM               PIPE_FORMAT_A4B4G4R4_UNORM
+#define MESA_FORMAT_R4G4B4A4_UNORM               PIPE_FORMAT_R4G4B4A4_UNORM
+#define MESA_FORMAT_R5G5B5A1_UNORM               PIPE_FORMAT_R5G5B5A1_UNORM
+#define MESA_FORMAT_A2B10G10R10_UNORM            PIPE_FORMAT_A2B10G10R10_UNORM
+#define MESA_FORMAT_A2R10G10B10_UNORM            PIPE_FORMAT_A2R10G10B10_UNORM
+#define MESA_FORMAT_YCBCR                        PIPE_FORMAT_UYVY
+#define MESA_FORMAT_YCBCR_REV                    PIPE_FORMAT_YUYV
+#define MESA_FORMAT_A_UNORM8                     PIPE_FORMAT_A8_UNORM
+#define MESA_FORMAT_A_UNORM16                    PIPE_FORMAT_A16_UNORM
+#define MESA_FORMAT_L_UNORM8                     PIPE_FORMAT_L8_UNORM
+#define MESA_FORMAT_L_UNORM16                    PIPE_FORMAT_L16_UNORM
+#define MESA_FORMAT_LA_UNORM8                    PIPE_FORMAT_L8A8_UNORM
+#define MESA_FORMAT_LA_UNORM16                   PIPE_FORMAT_L16A16_UNORM
+#define MESA_FORMAT_I_UNORM8                     PIPE_FORMAT_I8_UNORM
+#define MESA_FORMAT_I_UNORM16                    PIPE_FORMAT_I16_UNORM
+#define MESA_FORMAT_R_UNORM8                     PIPE_FORMAT_R8_UNORM
+#define MESA_FORMAT_R_UNORM16                    PIPE_FORMAT_R16_UNORM
+#define MESA_FORMAT_RG_UNORM8                    PIPE_FORMAT_R8G8_UNORM
+#define MESA_FORMAT_RG_UNORM16                   PIPE_FORMAT_R16G16_UNORM
+#define MESA_FORMAT_BGR_UNORM8                   PIPE_FORMAT_B8G8R8_UNORM
+#define MESA_FORMAT_RGB_UNORM8                   PIPE_FORMAT_R8G8B8_UNORM
+#define MESA_FORMAT_RGBA_UNORM16                 PIPE_FORMAT_R16G16B16A16_UNORM
+#define MESA_FORMAT_RGBX_UNORM16                 PIPE_FORMAT_R16G16B16X16_UNORM
+#define MESA_FORMAT_Z_UNORM16                    PIPE_FORMAT_Z16_UNORM
+#define MESA_FORMAT_Z_UNORM32                    PIPE_FORMAT_Z32_UNORM
+#define MESA_FORMAT_S_UINT8                      PIPE_FORMAT_S8_UINT
+#define MESA_FORMAT_A8B8G8R8_SNORM               PIPE_FORMAT_ABGR8888_SNORM
+#define MESA_FORMAT_X8B8G8R8_SNORM               PIPE_FORMAT_XBGR8888_SNORM
+#define MESA_FORMAT_R8G8B8A8_SNORM               PIPE_FORMAT_RGBA8888_SNORM
+#define MESA_FORMAT_R8G8B8X8_SNORM               PIPE_FORMAT_RGBX8888_SNORM
+#define MESA_FORMAT_A_SNORM8                     PIPE_FORMAT_A8_SNORM
+#define MESA_FORMAT_A_SNORM16                    PIPE_FORMAT_A16_SNORM
+#define MESA_FORMAT_L_SNORM8                     PIPE_FORMAT_L8_SNORM
+#define MESA_FORMAT_L_SNORM16                    PIPE_FORMAT_L16_SNORM
+#define MESA_FORMAT_I_SNORM8                     PIPE_FORMAT_I8_SNORM
+#define MESA_FORMAT_I_SNORM16                    PIPE_FORMAT_I16_SNORM
+#define MESA_FORMAT_R_SNORM8                     PIPE_FORMAT_R8_SNORM
+#define MESA_FORMAT_R_SNORM16                    PIPE_FORMAT_R16_SNORM
+#define MESA_FORMAT_LA_SNORM8                    PIPE_FORMAT_L8A8_SNORM
+#define MESA_FORMAT_LA_SNORM16                   PIPE_FORMAT_L16A16_SNORM
+#define MESA_FORMAT_RG_SNORM8                    PIPE_FORMAT_R8G8_SNORM
+#define MESA_FORMAT_RG_SNORM16                   PIPE_FORMAT_R16G16_SNORM
+#define MESA_FORMAT_RGB_SNORM16                  PIPE_FORMAT_R16G16B16_SNORM
+#define MESA_FORMAT_RGBA_SNORM16                 PIPE_FORMAT_R16G16B16A16_SNORM
+#define MESA_FORMAT_RGBX_SNORM16                 PIPE_FORMAT_R16G16B16X16_SNORM
+#define MESA_FORMAT_A8B8G8R8_SRGB                PIPE_FORMAT_ABGR8888_SRGB
+#define MESA_FORMAT_B8G8R8A8_SRGB                PIPE_FORMAT_BGRA8888_SRGB
+#define MESA_FORMAT_A8R8G8B8_SRGB                PIPE_FORMAT_ARGB8888_SRGB
+#define MESA_FORMAT_B8G8R8X8_SRGB                PIPE_FORMAT_BGRX8888_SRGB
+#define MESA_FORMAT_X8R8G8B8_SRGB                PIPE_FORMAT_XRGB8888_SRGB
+#define MESA_FORMAT_R8G8B8A8_SRGB                PIPE_FORMAT_RGBA8888_SRGB
+#define MESA_FORMAT_R8G8B8X8_SRGB                PIPE_FORMAT_RGBX8888_SRGB
+#define MESA_FORMAT_X8B8G8R8_SRGB                PIPE_FORMAT_XBGR8888_SRGB
+#define MESA_FORMAT_R_SRGB8                      PIPE_FORMAT_R8_SRGB
+#define MESA_FORMAT_L_SRGB8                      PIPE_FORMAT_L8_SRGB
+#define MESA_FORMAT_LA_SRGB8                     PIPE_FORMAT_L8A8_SRGB
+#define MESA_FORMAT_BGR_SRGB8                    PIPE_FORMAT_R8G8B8_SRGB
+#define MESA_FORMAT_R9G9B9E5_FLOAT               PIPE_FORMAT_R9G9B9E5_FLOAT
+#define MESA_FORMAT_R11G11B10_FLOAT              PIPE_FORMAT_R11G11B10_FLOAT
+#define MESA_FORMAT_Z32_FLOAT_S8X24_UINT         PIPE_FORMAT_Z32_FLOAT_S8X24_UINT
+#define MESA_FORMAT_A_FLOAT16                    PIPE_FORMAT_A16_FLOAT
+#define MESA_FORMAT_A_FLOAT32                    PIPE_FORMAT_A32_FLOAT
+#define MESA_FORMAT_L_FLOAT16                    PIPE_FORMAT_L16_FLOAT
+#define MESA_FORMAT_L_FLOAT32                    PIPE_FORMAT_L32_FLOAT
+#define MESA_FORMAT_LA_FLOAT16                   PIPE_FORMAT_L16A16_FLOAT
+#define MESA_FORMAT_LA_FLOAT32                   PIPE_FORMAT_L32A32_FLOAT
+#define MESA_FORMAT_I_FLOAT16                    PIPE_FORMAT_I16_FLOAT
+#define MESA_FORMAT_I_FLOAT32                    PIPE_FORMAT_I32_FLOAT
+#define MESA_FORMAT_R_FLOAT16                    PIPE_FORMAT_R16_FLOAT
+#define MESA_FORMAT_R_FLOAT32                    PIPE_FORMAT_R32_FLOAT
+#define MESA_FORMAT_RG_FLOAT16                   PIPE_FORMAT_R16G16_FLOAT
+#define MESA_FORMAT_RG_FLOAT32                   PIPE_FORMAT_R32G32_FLOAT
+#define MESA_FORMAT_RGB_FLOAT16                  PIPE_FORMAT_R16G16B16_FLOAT
+#define MESA_FORMAT_RGB_FLOAT32                  PIPE_FORMAT_R32G32B32_FLOAT
+#define MESA_FORMAT_RGBA_FLOAT16                 PIPE_FORMAT_R16G16B16A16_FLOAT
+#define MESA_FORMAT_RGBA_FLOAT32                 PIPE_FORMAT_R32G32B32A32_FLOAT
+#define MESA_FORMAT_RGBX_FLOAT16                 PIPE_FORMAT_R16G16B16X16_FLOAT
+#define MESA_FORMAT_RGBX_FLOAT32                 PIPE_FORMAT_R32G32B32X32_FLOAT
+#define MESA_FORMAT_Z_FLOAT32                    PIPE_FORMAT_Z32_FLOAT
+#define MESA_FORMAT_A8B8G8R8_UINT                PIPE_FORMAT_ABGR8888_UINT
+#define MESA_FORMAT_A8R8G8B8_UINT                PIPE_FORMAT_ARGB8888_UINT
+#define MESA_FORMAT_R8G8B8A8_UINT                PIPE_FORMAT_RGBA8888_UINT
+#define MESA_FORMAT_B8G8R8A8_UINT                PIPE_FORMAT_BGRA8888_UINT
+#define MESA_FORMAT_B10G10R10A2_UINT             PIPE_FORMAT_B10G10R10A2_UINT
+#define MESA_FORMAT_R10G10B10A2_UINT             PIPE_FORMAT_R10G10B10A2_UINT
+#define MESA_FORMAT_A2B10G10R10_UINT             PIPE_FORMAT_A2B10G10R10_UINT
+#define MESA_FORMAT_A2R10G10B10_UINT             PIPE_FORMAT_A2R10G10B10_UINT
+#define MESA_FORMAT_B5G6R5_UINT                  PIPE_FORMAT_B5G6R5_UINT
+#define MESA_FORMAT_R5G6B5_UINT                  PIPE_FORMAT_R5G6B5_UINT
+#define MESA_FORMAT_B2G3R3_UINT                  PIPE_FORMAT_B2G3R3_UINT
+#define MESA_FORMAT_R3G3B2_UINT                  PIPE_FORMAT_R3G3B2_UINT
+#define MESA_FORMAT_A4B4G4R4_UINT                PIPE_FORMAT_A4B4G4R4_UINT
+#define MESA_FORMAT_R4G4B4A4_UINT                PIPE_FORMAT_R4G4B4A4_UINT
+#define MESA_FORMAT_B4G4R4A4_UINT                PIPE_FORMAT_B4G4R4A4_UINT
+#define MESA_FORMAT_A4R4G4B4_UINT                PIPE_FORMAT_A4R4G4B4_UINT
+#define MESA_FORMAT_A1B5G5R5_UINT                PIPE_FORMAT_A1B5G5R5_UINT
+#define MESA_FORMAT_B5G5R5A1_UINT                PIPE_FORMAT_B5G5R5A1_UINT
+#define MESA_FORMAT_A1R5G5B5_UINT                PIPE_FORMAT_A1R5G5B5_UINT
+#define MESA_FORMAT_R5G5B5A1_UINT                PIPE_FORMAT_R5G5B5A1_UINT
+#define MESA_FORMAT_A_UINT8                      PIPE_FORMAT_A8_UINT
+#define MESA_FORMAT_A_UINT16                     PIPE_FORMAT_A16_UINT
+#define MESA_FORMAT_A_UINT32                     PIPE_FORMAT_A32_UINT
+#define MESA_FORMAT_A_SINT8                      PIPE_FORMAT_A8_SINT
+#define MESA_FORMAT_A_SINT16                     PIPE_FORMAT_A16_SINT
+#define MESA_FORMAT_A_SINT32                     PIPE_FORMAT_A32_SINT
+#define MESA_FORMAT_I_UINT8                      PIPE_FORMAT_I8_UINT
+#define MESA_FORMAT_I_UINT16                     PIPE_FORMAT_I16_UINT
+#define MESA_FORMAT_I_UINT32                     PIPE_FORMAT_I32_UINT
+#define MESA_FORMAT_I_SINT8                      PIPE_FORMAT_I8_SINT
+#define MESA_FORMAT_I_SINT16                     PIPE_FORMAT_I16_SINT
+#define MESA_FORMAT_I_SINT32                     PIPE_FORMAT_I32_SINT
+#define MESA_FORMAT_L_UINT8                      PIPE_FORMAT_L8_UINT
+#define MESA_FORMAT_L_UINT16                     PIPE_FORMAT_L16_UINT
+#define MESA_FORMAT_L_UINT32                     PIPE_FORMAT_L32_UINT
+#define MESA_FORMAT_L_SINT8                      PIPE_FORMAT_L8_SINT
+#define MESA_FORMAT_L_SINT16                     PIPE_FORMAT_L16_SINT
+#define MESA_FORMAT_L_SINT32                     PIPE_FORMAT_L32_SINT
+#define MESA_FORMAT_LA_UINT8                     PIPE_FORMAT_L8A8_UINT
+#define MESA_FORMAT_LA_UINT16                    PIPE_FORMAT_L16A16_UINT
+#define MESA_FORMAT_LA_UINT32                    PIPE_FORMAT_L32A32_UINT
+#define MESA_FORMAT_LA_SINT8                     PIPE_FORMAT_L8A8_SINT
+#define MESA_FORMAT_LA_SINT16                    PIPE_FORMAT_L16A16_SINT
+#define MESA_FORMAT_LA_SINT32                    PIPE_FORMAT_L32A32_SINT
+#define MESA_FORMAT_R_UINT8                      PIPE_FORMAT_R8_UINT
+#define MESA_FORMAT_R_UINT16                     PIPE_FORMAT_R16_UINT
+#define MESA_FORMAT_R_UINT32                     PIPE_FORMAT_R32_UINT
+#define MESA_FORMAT_R_SINT8                      PIPE_FORMAT_R8_SINT
+#define MESA_FORMAT_R_SINT16                     PIPE_FORMAT_R16_SINT
+#define MESA_FORMAT_R_SINT32                     PIPE_FORMAT_R32_SINT
+#define MESA_FORMAT_RG_UINT8                     PIPE_FORMAT_R8G8_UINT
+#define MESA_FORMAT_RG_UINT16                    PIPE_FORMAT_R16G16_UINT
+#define MESA_FORMAT_RG_UINT32                    PIPE_FORMAT_R32G32_UINT
+#define MESA_FORMAT_RG_SINT8                     PIPE_FORMAT_R8G8_SINT
+#define MESA_FORMAT_RG_SINT16                    PIPE_FORMAT_R16G16_SINT
+#define MESA_FORMAT_RG_SINT32                    PIPE_FORMAT_R32G32_SINT
+#define MESA_FORMAT_RGB_UINT8                    PIPE_FORMAT_R8G8B8_UINT
+#define MESA_FORMAT_RGB_UINT16                   PIPE_FORMAT_R16G16B16_UINT
+#define MESA_FORMAT_RGB_UINT32                   PIPE_FORMAT_R32G32B32_UINT
+#define MESA_FORMAT_RGB_SINT8                    PIPE_FORMAT_R8G8B8_SINT
+#define MESA_FORMAT_RGB_SINT16                   PIPE_FORMAT_R16G16B16_SINT
+#define MESA_FORMAT_RGB_SINT32                   PIPE_FORMAT_R32G32B32_SINT
+#define MESA_FORMAT_RGBA_UINT16                  PIPE_FORMAT_R16G16B16A16_UINT
+#define MESA_FORMAT_RGBA_UINT32                  PIPE_FORMAT_R32G32B32A32_UINT
+#define MESA_FORMAT_RGBA_SINT8                   PIPE_FORMAT_R8G8B8A8_SINT
+#define MESA_FORMAT_RGBA_SINT16                  PIPE_FORMAT_R16G16B16A16_SINT
+#define MESA_FORMAT_RGBA_SINT32                  PIPE_FORMAT_R32G32B32A32_SINT
+#define MESA_FORMAT_RGBX_UINT8                   PIPE_FORMAT_R8G8B8X8_UINT
+#define MESA_FORMAT_RGBX_UINT16                  PIPE_FORMAT_R16G16B16X16_UINT
+#define MESA_FORMAT_RGBX_UINT32                  PIPE_FORMAT_R32G32B32X32_UINT
+#define MESA_FORMAT_RGBX_SINT8                   PIPE_FORMAT_R8G8B8X8_SINT
+#define MESA_FORMAT_RGBX_SINT16                  PIPE_FORMAT_R16G16B16X16_SINT
+#define MESA_FORMAT_RGBX_SINT32                  PIPE_FORMAT_R32G32B32X32_SINT
+#define MESA_FORMAT_RGB_DXT1                     PIPE_FORMAT_DXT1_RGB
+#define MESA_FORMAT_RGBA_DXT1                    PIPE_FORMAT_DXT1_RGBA
+#define MESA_FORMAT_RGBA_DXT3                    PIPE_FORMAT_DXT3_RGBA
+#define MESA_FORMAT_RGBA_DXT5                    PIPE_FORMAT_DXT5_RGBA
+#define MESA_FORMAT_SRGB_DXT1                    PIPE_FORMAT_DXT1_SRGB
+#define MESA_FORMAT_SRGBA_DXT1                   PIPE_FORMAT_DXT1_SRGBA
+#define MESA_FORMAT_SRGBA_DXT3                   PIPE_FORMAT_DXT3_SRGBA
+#define MESA_FORMAT_SRGBA_DXT5                   PIPE_FORMAT_DXT5_SRGBA
+#define MESA_FORMAT_RGB_FXT1                     PIPE_FORMAT_FXT1_RGB
+#define MESA_FORMAT_RGBA_FXT1                    PIPE_FORMAT_FXT1_RGBA
+#define MESA_FORMAT_R_RGTC1_UNORM                PIPE_FORMAT_RGTC1_UNORM
+#define MESA_FORMAT_R_RGTC1_SNORM                PIPE_FORMAT_RGTC1_SNORM
+#define MESA_FORMAT_RG_RGTC2_UNORM               PIPE_FORMAT_RGTC2_UNORM
+#define MESA_FORMAT_RG_RGTC2_SNORM               PIPE_FORMAT_RGTC2_SNORM
+#define MESA_FORMAT_L_LATC1_UNORM                PIPE_FORMAT_LATC1_UNORM
+#define MESA_FORMAT_L_LATC1_SNORM                PIPE_FORMAT_LATC1_SNORM
+#define MESA_FORMAT_LA_LATC2_UNORM               PIPE_FORMAT_LATC2_UNORM
+#define MESA_FORMAT_LA_LATC2_SNORM               PIPE_FORMAT_LATC2_SNORM
+#define MESA_FORMAT_ETC1_RGB8                    PIPE_FORMAT_ETC1_RGB8
+#define MESA_FORMAT_ETC2_RGB8                    PIPE_FORMAT_ETC2_RGB8
+#define MESA_FORMAT_ETC2_SRGB8                   PIPE_FORMAT_ETC2_SRGB8
+#define MESA_FORMAT_ETC2_RGBA8_EAC               PIPE_FORMAT_ETC2_RGBA8
+#define MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC        PIPE_FORMAT_ETC2_SRGBA8
+#define MESA_FORMAT_ETC2_R11_EAC                 PIPE_FORMAT_ETC2_R11_UNORM
+#define MESA_FORMAT_ETC2_RG11_EAC                PIPE_FORMAT_ETC2_RG11_UNORM
+#define MESA_FORMAT_ETC2_SIGNED_R11_EAC          PIPE_FORMAT_ETC2_R11_SNORM
+#define MESA_FORMAT_ETC2_SIGNED_RG11_EAC         PIPE_FORMAT_ETC2_RG11_SNORM
+#define MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1 PIPE_FORMAT_ETC2_RGB8A1
+#define MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1 PIPE_FORMAT_ETC2_SRGB8A1
+#define MESA_FORMAT_BPTC_RGBA_UNORM              PIPE_FORMAT_BPTC_RGBA_UNORM
+#define MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM        PIPE_FORMAT_BPTC_SRGBA
+#define MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT        PIPE_FORMAT_BPTC_RGB_FLOAT
+#define MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT      PIPE_FORMAT_BPTC_RGB_UFLOAT
+#define MESA_FORMAT_RGBA_ASTC_4x4                PIPE_FORMAT_ASTC_4x4
+#define MESA_FORMAT_RGBA_ASTC_5x4                PIPE_FORMAT_ASTC_5x4
+#define MESA_FORMAT_RGBA_ASTC_5x5                PIPE_FORMAT_ASTC_5x5
+#define MESA_FORMAT_RGBA_ASTC_6x5                PIPE_FORMAT_ASTC_6x5
+#define MESA_FORMAT_RGBA_ASTC_6x6                PIPE_FORMAT_ASTC_6x6
+#define MESA_FORMAT_RGBA_ASTC_8x5                PIPE_FORMAT_ASTC_8x5
+#define MESA_FORMAT_RGBA_ASTC_8x6                PIPE_FORMAT_ASTC_8x6
+#define MESA_FORMAT_RGBA_ASTC_8x8                PIPE_FORMAT_ASTC_8x8
+#define MESA_FORMAT_RGBA_ASTC_10x5               PIPE_FORMAT_ASTC_10x5
+#define MESA_FORMAT_RGBA_ASTC_10x6               PIPE_FORMAT_ASTC_10x6
+#define MESA_FORMAT_RGBA_ASTC_10x8               PIPE_FORMAT_ASTC_10x8
+#define MESA_FORMAT_RGBA_ASTC_10x10              PIPE_FORMAT_ASTC_10x10
+#define MESA_FORMAT_RGBA_ASTC_12x10              PIPE_FORMAT_ASTC_12x10
+#define MESA_FORMAT_RGBA_ASTC_12x12              PIPE_FORMAT_ASTC_12x12
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4        PIPE_FORMAT_ASTC_4x4_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4        PIPE_FORMAT_ASTC_5x4_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5        PIPE_FORMAT_ASTC_5x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5        PIPE_FORMAT_ASTC_6x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6        PIPE_FORMAT_ASTC_6x6_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5        PIPE_FORMAT_ASTC_8x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6        PIPE_FORMAT_ASTC_8x6_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8        PIPE_FORMAT_ASTC_8x8_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5       PIPE_FORMAT_ASTC_10x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6       PIPE_FORMAT_ASTC_10x6_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8       PIPE_FORMAT_ASTC_10x8_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10      PIPE_FORMAT_ASTC_10x10_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10      PIPE_FORMAT_ASTC_12x10_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12      PIPE_FORMAT_ASTC_12x12_SRGB
+#define MESA_FORMAT_RGBA_ASTC_3x3x3              PIPE_FORMAT_ASTC_3x3x3
+#define MESA_FORMAT_RGBA_ASTC_4x3x3              PIPE_FORMAT_ASTC_4x3x3
+#define MESA_FORMAT_RGBA_ASTC_4x4x3              PIPE_FORMAT_ASTC_4x4x3
+#define MESA_FORMAT_RGBA_ASTC_4x4x4              PIPE_FORMAT_ASTC_4x4x4
+#define MESA_FORMAT_RGBA_ASTC_5x4x4              PIPE_FORMAT_ASTC_5x4x4
+#define MESA_FORMAT_RGBA_ASTC_5x5x4              PIPE_FORMAT_ASTC_5x5x4
+#define MESA_FORMAT_RGBA_ASTC_5x5x5              PIPE_FORMAT_ASTC_5x5x5
+#define MESA_FORMAT_RGBA_ASTC_6x5x5              PIPE_FORMAT_ASTC_6x5x5
+#define MESA_FORMAT_RGBA_ASTC_6x6x5              PIPE_FORMAT_ASTC_6x6x5
+#define MESA_FORMAT_RGBA_ASTC_6x6x6              PIPE_FORMAT_ASTC_6x6x6
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3      PIPE_FORMAT_ASTC_3x3x3_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3      PIPE_FORMAT_ASTC_4x3x3_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3      PIPE_FORMAT_ASTC_4x4x3_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4      PIPE_FORMAT_ASTC_4x4x4_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4      PIPE_FORMAT_ASTC_5x4x4_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4      PIPE_FORMAT_ASTC_5x5x4_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5      PIPE_FORMAT_ASTC_5x5x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5      PIPE_FORMAT_ASTC_6x5x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5      PIPE_FORMAT_ASTC_6x6x5_SRGB
+#define MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6      PIPE_FORMAT_ASTC_6x6x6_SRGB
+#define MESA_FORMAT_ATC_RGB                      PIPE_FORMAT_ATC_RGB
+#define MESA_FORMAT_ATC_RGBA_EXPLICIT            PIPE_FORMAT_ATC_RGBA_EXPLICIT
+#define MESA_FORMAT_ATC_RGBA_INTERPOLATED        PIPE_FORMAT_ATC_RGBA_INTERPOLATED
+#define MESA_FORMAT_COUNT                        PIPE_FORMAT_COUNT
 
 /* Packed to array format adapters */
 #if UTIL_ARCH_LITTLE_ENDIAN