case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
return st->has_etc2 ? PIPE_FORMAT_ETC2_SRGB8A1 : PIPE_FORMAT_B8G8R8A8_SRGB;
+ case MESA_FORMAT_RGBA_ASTC_4x4:
+ return PIPE_FORMAT_ASTC_4x4;
+ case MESA_FORMAT_RGBA_ASTC_5x4:
+ return PIPE_FORMAT_ASTC_5x4;
+ case MESA_FORMAT_RGBA_ASTC_5x5:
+ return PIPE_FORMAT_ASTC_5x5;
+ case MESA_FORMAT_RGBA_ASTC_6x5:
+ return PIPE_FORMAT_ASTC_6x5;
+ case MESA_FORMAT_RGBA_ASTC_6x6:
+ return PIPE_FORMAT_ASTC_6x6;
+ case MESA_FORMAT_RGBA_ASTC_8x5:
+ return PIPE_FORMAT_ASTC_8x5;
+ case MESA_FORMAT_RGBA_ASTC_8x6:
+ return PIPE_FORMAT_ASTC_8x6;
+ case MESA_FORMAT_RGBA_ASTC_8x8:
+ return PIPE_FORMAT_ASTC_8x8;
+ case MESA_FORMAT_RGBA_ASTC_10x5:
+ return PIPE_FORMAT_ASTC_10x5;
+ case MESA_FORMAT_RGBA_ASTC_10x6:
+ return PIPE_FORMAT_ASTC_10x6;
+ case MESA_FORMAT_RGBA_ASTC_10x8:
+ return PIPE_FORMAT_ASTC_10x8;
+ case MESA_FORMAT_RGBA_ASTC_10x10:
+ return PIPE_FORMAT_ASTC_10x10;
+ case MESA_FORMAT_RGBA_ASTC_12x10:
+ return PIPE_FORMAT_ASTC_12x10;
+ case MESA_FORMAT_RGBA_ASTC_12x12:
+ return PIPE_FORMAT_ASTC_12x12;
+
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4:
+ return PIPE_FORMAT_ASTC_4x4_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4:
+ return PIPE_FORMAT_ASTC_5x4_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5:
+ return PIPE_FORMAT_ASTC_5x5_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5:
+ return PIPE_FORMAT_ASTC_6x5_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6:
+ return PIPE_FORMAT_ASTC_6x6_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5:
+ return PIPE_FORMAT_ASTC_8x5_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6:
+ return PIPE_FORMAT_ASTC_8x6_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8:
+ return PIPE_FORMAT_ASTC_8x8_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5:
+ return PIPE_FORMAT_ASTC_10x5_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6:
+ return PIPE_FORMAT_ASTC_10x6_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8:
+ return PIPE_FORMAT_ASTC_10x8_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10:
+ return PIPE_FORMAT_ASTC_10x10_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10:
+ return PIPE_FORMAT_ASTC_12x10_SRGB;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12:
+ return PIPE_FORMAT_ASTC_12x12_SRGB;
+
default:
return PIPE_FORMAT_NONE;
}
case PIPE_FORMAT_ETC2_RG11_SNORM:
return MESA_FORMAT_ETC2_SIGNED_RG11_EAC;
+ case PIPE_FORMAT_ASTC_4x4:
+ return MESA_FORMAT_RGBA_ASTC_4x4;
+ case PIPE_FORMAT_ASTC_5x4:
+ return MESA_FORMAT_RGBA_ASTC_5x4;
+ case PIPE_FORMAT_ASTC_5x5:
+ return MESA_FORMAT_RGBA_ASTC_5x5;
+ case PIPE_FORMAT_ASTC_6x5:
+ return MESA_FORMAT_RGBA_ASTC_6x5;
+ case PIPE_FORMAT_ASTC_6x6:
+ return MESA_FORMAT_RGBA_ASTC_6x6;
+ case PIPE_FORMAT_ASTC_8x5:
+ return MESA_FORMAT_RGBA_ASTC_8x5;
+ case PIPE_FORMAT_ASTC_8x6:
+ return MESA_FORMAT_RGBA_ASTC_8x6;
+ case PIPE_FORMAT_ASTC_8x8:
+ return MESA_FORMAT_RGBA_ASTC_8x8;
+ case PIPE_FORMAT_ASTC_10x5:
+ return MESA_FORMAT_RGBA_ASTC_10x5;
+ case PIPE_FORMAT_ASTC_10x6:
+ return MESA_FORMAT_RGBA_ASTC_10x6;
+ case PIPE_FORMAT_ASTC_10x8:
+ return MESA_FORMAT_RGBA_ASTC_10x8;
+ case PIPE_FORMAT_ASTC_10x10:
+ return MESA_FORMAT_RGBA_ASTC_10x10;
+ case PIPE_FORMAT_ASTC_12x10:
+ return MESA_FORMAT_RGBA_ASTC_12x10;
+ case PIPE_FORMAT_ASTC_12x12:
+ return MESA_FORMAT_RGBA_ASTC_12x12;
+
+ case PIPE_FORMAT_ASTC_4x4_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4;
+ case PIPE_FORMAT_ASTC_5x4_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4;
+ case PIPE_FORMAT_ASTC_5x5_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5;
+ case PIPE_FORMAT_ASTC_6x5_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5;
+ case PIPE_FORMAT_ASTC_6x6_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6;
+ case PIPE_FORMAT_ASTC_8x5_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5;
+ case PIPE_FORMAT_ASTC_8x6_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6;
+ case PIPE_FORMAT_ASTC_8x8_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8;
+ case PIPE_FORMAT_ASTC_10x5_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5;
+ case PIPE_FORMAT_ASTC_10x6_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6;
+ case PIPE_FORMAT_ASTC_10x8_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8;
+ case PIPE_FORMAT_ASTC_10x10_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10;
+ case PIPE_FORMAT_ASTC_12x10_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10;
+ case PIPE_FORMAT_ASTC_12x12_SRGB:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12;
+
default:
return MESA_FORMAT_NONE;
}
{ PIPE_FORMAT_BPTC_RGB_UFLOAT, 0 },
},
+ /* ASTC */
+ {
+ { GL_COMPRESSED_RGBA_ASTC_4x4_KHR, 0 },
+ { PIPE_FORMAT_ASTC_4x4, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_5x4_KHR, 0 },
+ { PIPE_FORMAT_ASTC_5x4, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_5x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_5x5, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_6x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_6x5, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_6x6_KHR, 0 },
+ { PIPE_FORMAT_ASTC_6x6, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_8x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_8x5, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_8x6_KHR, 0 },
+ { PIPE_FORMAT_ASTC_8x6, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_8x8_KHR, 0 },
+ { PIPE_FORMAT_ASTC_8x8, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_10x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x5, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_10x6_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x6, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_10x8_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x8, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_10x10_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x10, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_12x10_KHR, 0 },
+ { PIPE_FORMAT_ASTC_12x10, 0},
+ },
+ {
+ { GL_COMPRESSED_RGBA_ASTC_12x12_KHR, 0 },
+ { PIPE_FORMAT_ASTC_12x12, 0},
+ },
+
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, 0 },
+ { PIPE_FORMAT_ASTC_4x4_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, 0 },
+ { PIPE_FORMAT_ASTC_5x4_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_5x5_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_6x5_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, 0 },
+ { PIPE_FORMAT_ASTC_6x6_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_8x5_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, 0 },
+ { PIPE_FORMAT_ASTC_8x6_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, 0 },
+ { PIPE_FORMAT_ASTC_8x8_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x5_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x6_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x8_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, 0 },
+ { PIPE_FORMAT_ASTC_10x10_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, 0 },
+ { PIPE_FORMAT_ASTC_12x10_SRGB, 0},
+ },
+ {
+ { GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, 0 },
+ { PIPE_FORMAT_ASTC_12x12_SRGB, 0},
+ },
+
/* signed/unsigned integer formats.
*/
{