},
/* unnormalized signed int formats */
+ /* unnormalized unsigned int formats */
+ {
+ MESA_FORMAT_ALPHA_UINT8,
+ "MESA_FORMAT_ALPHA_UINT8",
+ GL_ALPHA,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_ALPHA_UINT16,
+ "MESA_FORMAT_ALPHA_UINT16",
+ GL_ALPHA,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_ALPHA_UINT32,
+ "MESA_FORMAT_ALPHA_UINT32",
+ GL_ALPHA,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 32,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_ALPHA_INT8,
+ "MESA_FORMAT_ALPHA_INT8",
+ GL_ALPHA,
+ GL_INT,
+ 0, 0, 0, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_ALPHA_INT16,
+ "MESA_FORMAT_ALPHA_INT16",
+ GL_ALPHA,
+ GL_INT,
+ 0, 0, 0, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_ALPHA_INT32,
+ "MESA_FORMAT_ALPHA_INT32",
+ GL_ALPHA,
+ GL_INT,
+ 0, 0, 0, 32,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_INTENSITY_UINT8,
+ "MESA_FORMAT_INTENSITY_UINT8",
+ GL_INTENSITY,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 0,
+ 0, 8, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_INTENSITY_UINT16,
+ "MESA_FORMAT_INTENSITY_UINT16",
+ GL_INTENSITY,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 0,
+ 0, 16, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_INTENSITY_UINT32,
+ "MESA_FORMAT_INTENSITY_UINT32",
+ GL_INTENSITY,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 0,
+ 0, 32, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_INTENSITY_INT8,
+ "MESA_FORMAT_INTENSITY_INT8",
+ GL_INTENSITY,
+ GL_INT,
+ 0, 0, 0, 0,
+ 0, 8, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_INTENSITY_INT16,
+ "MESA_FORMAT_INTENSITY_INT16",
+ GL_INTENSITY,
+ GL_INT,
+ 0, 0, 0, 0,
+ 0, 16, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_INTENSITY_INT32,
+ "MESA_FORMAT_INTENSITY_INT32",
+ GL_INTENSITY,
+ GL_INT,
+ 0, 0, 0, 0,
+ 0, 32, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_LUMINANCE_UINT8,
+ "MESA_FORMAT_LUMINANCE_UINT8",
+ GL_LUMINANCE,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 0,
+ 8, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_LUMINANCE_UINT16,
+ "MESA_FORMAT_LUMINANCE_UINT16",
+ GL_LUMINANCE,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 0,
+ 16, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_LUMINANCE_UINT32,
+ "MESA_FORMAT_LUMINANCE_UINT32",
+ GL_LUMINANCE,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 0,
+ 32, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_LUMINANCE_INT8,
+ "MESA_FORMAT_LUMINANCE_INT8",
+ GL_LUMINANCE,
+ GL_INT,
+ 0, 0, 0, 0,
+ 8, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_LUMINANCE_INT16,
+ "MESA_FORMAT_LUMINANCE_INT16",
+ GL_LUMINANCE,
+ GL_INT,
+ 0, 0, 0, 0,
+ 16, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_LUMINANCE_INT32,
+ "MESA_FORMAT_LUMINANCE_INT32",
+ GL_LUMINANCE,
+ GL_INT,
+ 0, 0, 0, 0,
+ 32, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_UINT8,
+ "MESA_FORMAT_LUMINANCE_ALPHA_UINT8",
+ GL_LUMINANCE_ALPHA,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 8,
+ 8, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_UINT16,
+ "MESA_FORMAT_LUMINANCE_ALPHA_UINT16",
+ GL_LUMINANCE_ALPHA,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 16,
+ 16, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_UINT32,
+ "MESA_FORMAT_LUMINANCE_ALPHA_UINT32",
+ GL_LUMINANCE_ALPHA,
+ GL_UNSIGNED_INT,
+ 0, 0, 0, 32,
+ 32, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_INT8,
+ "MESA_FORMAT_LUMINANCE_ALPHA_INT8",
+ GL_LUMINANCE_ALPHA,
+ GL_INT,
+ 0, 0, 0, 8,
+ 8, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_LUMINANCE_ALPHA_INT16,
+ "MESA_FORMAT_LUMINANCE_ALPHA_INT16",
+ GL_LUMINANCE_ALPHA,
+ GL_INT,
+ 0, 0, 0, 16,
+ 16, 0, 0, 0, 0,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T,
+ 32, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_RG_INT32,
+ "MESA_FORMAT_RG_INT32",
+ GL_RG,
+ GL_INT,
+ 32, 32, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_RGB_INT32,
+ "MESA_FORMAT_RGB_INT32",
+ GL_RGB,
+ GL_INT,
+ 32, 32, 32, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 12
+ },
{
MESA_FORMAT_RGBA_INT32,
"MESA_FORMAT_RGBA_INT32",
0, 0, 0, 0, 0,
1, 1, 16
},
-
- /* unnormalized unsigned int formats */
+ {
+ MESA_FORMAT_R_UINT8,
+ "MESA_FORMAT_R_UINT8",
+ GL_RED,
+ GL_UNSIGNED_INT,
+ 8, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_RG_UINT8,
+ "MESA_FORMAT_RG_UINT8",
+ GL_RG,
+ GL_UNSIGNED_INT,
+ 8, 8, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_RGB_UINT8,
+ "MESA_FORMAT_RGB_UINT8",
+ GL_RGB,
+ GL_UNSIGNED_INT,
+ 8, 8, 8, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 3
+ },
{
MESA_FORMAT_RGBA_UINT8,
"MESA_FORMAT_RGBA_UINT8",
0, 0, 0, 0, 0,
1, 1, 4
},
+ {
+ MESA_FORMAT_R_UINT16,
+ "MESA_FORMAT_R_UINT16",
+ GL_RED,
+ GL_UNSIGNED_INT,
+ 16, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_RG_UINT16,
+ "MESA_FORMAT_RG_UINT16",
+ GL_RG,
+ GL_UNSIGNED_INT,
+ 16, 16, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_RGB_UINT16,
+ "MESA_FORMAT_RGB_UINT16",
+ GL_RGB,
+ GL_UNSIGNED_INT,
+ 16, 16, 16, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 6
+ },
{
MESA_FORMAT_RGBA_UINT16,
"MESA_FORMAT_RGBA_UINT16",
0, 0, 0, 0, 0,
1, 1, 8
},
+ {
+ MESA_FORMAT_R_UINT32,
+ "MESA_FORMAT_R_UINT32",
+ GL_RED,
+ GL_UNSIGNED_INT,
+ 32, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_RG_UINT32,
+ "MESA_FORMAT_RG_UINT32",
+ GL_RG,
+ GL_UNSIGNED_INT,
+ 32, 32, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_RGB_UINT32,
+ "MESA_FORMAT_RGB_UINT32",
+ GL_RGB,
+ GL_UNSIGNED_INT,
+ 32, 32, 32, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 12
+ },
{
MESA_FORMAT_RGBA_UINT32,
"MESA_FORMAT_RGBA_UINT32",
*comps = 1;
return;
+ case MESA_FORMAT_ALPHA_UINT8:
+ case MESA_FORMAT_LUMINANCE_UINT8:
+ case MESA_FORMAT_INTENSITY_UINT8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_UINT8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_ALPHA_UINT16:
+ case MESA_FORMAT_LUMINANCE_UINT16:
+ case MESA_FORMAT_INTENSITY_UINT16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_UINT16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_ALPHA_UINT32:
+ case MESA_FORMAT_LUMINANCE_UINT32:
+ case MESA_FORMAT_INTENSITY_UINT32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_ALPHA_INT8:
+ case MESA_FORMAT_LUMINANCE_INT8:
+ case MESA_FORMAT_INTENSITY_INT8:
+ *datatype = GL_BYTE;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_INT8:
+ *datatype = GL_BYTE;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_ALPHA_INT16:
+ case MESA_FORMAT_LUMINANCE_INT16:
+ case MESA_FORMAT_INTENSITY_INT16:
+ *datatype = GL_SHORT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_INT16:
+ *datatype = GL_SHORT;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_ALPHA_INT32:
+ case MESA_FORMAT_LUMINANCE_INT32:
+ case MESA_FORMAT_INTENSITY_INT32:
+ *datatype = GL_INT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
+ *datatype = GL_INT;
+ *comps = 2;
+ return;
+
+ case MESA_FORMAT_R_INT8:
+ *datatype = GL_BYTE;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_RG_INT8:
+ *datatype = GL_BYTE;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_RGB_INT8:
+ *datatype = GL_BYTE;
+ *comps = 3;
+ return;
case MESA_FORMAT_RGBA_INT8:
*datatype = GL_BYTE;
*comps = 4;
return;
+ case MESA_FORMAT_R_INT16:
+ *datatype = GL_SHORT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_RG_INT16:
+ *datatype = GL_SHORT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_RGB_INT16:
+ *datatype = GL_SHORT;
+ *comps = 3;
+ return;
case MESA_FORMAT_RGBA_INT16:
*datatype = GL_SHORT;
*comps = 4;
return;
+ case MESA_FORMAT_R_INT32:
+ *datatype = GL_INT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_RG_INT32:
+ *datatype = GL_INT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_RGB_INT32:
+ *datatype = GL_INT;
+ *comps = 3;
+ return;
case MESA_FORMAT_RGBA_INT32:
*datatype = GL_INT;
*comps = 4;
/**
* \name Non-normalized unsigned integer formats.
*/
+ case MESA_FORMAT_R_UINT8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_RG_UINT8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_RGB_UINT8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *comps = 3;
+ return;
case MESA_FORMAT_RGBA_UINT8:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
+ case MESA_FORMAT_R_UINT16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_RG_UINT16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_RGB_UINT16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 3;
+ return;
case MESA_FORMAT_RGBA_UINT16:
*datatype = GL_UNSIGNED_SHORT;
*comps = 4;
return;
+ case MESA_FORMAT_R_UINT32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_RG_UINT32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 2;
+ return;
+ case MESA_FORMAT_RGB_UINT32:
+ *datatype = GL_UNSIGNED_INT;
+ *comps = 3;
+ return;
case MESA_FORMAT_RGBA_UINT32:
*datatype = GL_UNSIGNED_INT;
*comps = 4;
* XXX Note: these are just stand-ins for some better hardware
* formats TBD such as BGRA or ARGB.
*/
+ MESA_FORMAT_ALPHA_UINT8,
+ MESA_FORMAT_ALPHA_UINT16,
+ MESA_FORMAT_ALPHA_UINT32,
+ MESA_FORMAT_ALPHA_INT8,
+ MESA_FORMAT_ALPHA_INT16,
+ MESA_FORMAT_ALPHA_INT32,
+
+ MESA_FORMAT_INTENSITY_UINT8,
+ MESA_FORMAT_INTENSITY_UINT16,
+ MESA_FORMAT_INTENSITY_UINT32,
+ MESA_FORMAT_INTENSITY_INT8,
+ MESA_FORMAT_INTENSITY_INT16,
+ MESA_FORMAT_INTENSITY_INT32,
+
+ MESA_FORMAT_LUMINANCE_UINT8,
+ MESA_FORMAT_LUMINANCE_UINT16,
+ MESA_FORMAT_LUMINANCE_UINT32,
+ MESA_FORMAT_LUMINANCE_INT8,
+ MESA_FORMAT_LUMINANCE_INT16,
+ MESA_FORMAT_LUMINANCE_INT32,
+
+ MESA_FORMAT_LUMINANCE_ALPHA_UINT8,
+ MESA_FORMAT_LUMINANCE_ALPHA_UINT16,
+ MESA_FORMAT_LUMINANCE_ALPHA_UINT32,
+ MESA_FORMAT_LUMINANCE_ALPHA_INT8,
+ MESA_FORMAT_LUMINANCE_ALPHA_INT16,
+ MESA_FORMAT_LUMINANCE_ALPHA_INT32,
+
+ MESA_FORMAT_R_INT8,
+ MESA_FORMAT_RG_INT8,
+ MESA_FORMAT_RGB_INT8,
MESA_FORMAT_RGBA_INT8,
+ MESA_FORMAT_R_INT16,
+ MESA_FORMAT_RG_INT16,
+ MESA_FORMAT_RGB_INT16,
MESA_FORMAT_RGBA_INT16,
+ MESA_FORMAT_R_INT32,
+ MESA_FORMAT_RG_INT32,
+ MESA_FORMAT_RGB_INT32,
MESA_FORMAT_RGBA_INT32,
/**
* \name Non-normalized unsigned integer formats.
*/
+ MESA_FORMAT_R_UINT8,
+ MESA_FORMAT_RG_UINT8,
+ MESA_FORMAT_RGB_UINT8,
MESA_FORMAT_RGBA_UINT8,
+ MESA_FORMAT_R_UINT16,
+ MESA_FORMAT_RG_UINT16,
+ MESA_FORMAT_RGB_UINT16,
MESA_FORMAT_RGBA_UINT16,
+ MESA_FORMAT_R_UINT32,
+ MESA_FORMAT_RG_UINT32,
+ MESA_FORMAT_RGB_UINT32,
MESA_FORMAT_RGBA_UINT32,
/* msb <------ TEXEL BITS -----------> lsb */