case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:
return MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT;
+ case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
+ return MESA_FORMAT_RGBA_ASTC_4x4;
+ case GL_COMPRESSED_RGBA_ASTC_5x4_KHR:
+ return MESA_FORMAT_RGBA_ASTC_5x4;
+ case GL_COMPRESSED_RGBA_ASTC_5x5_KHR:
+ return MESA_FORMAT_RGBA_ASTC_5x5;
+ case GL_COMPRESSED_RGBA_ASTC_6x5_KHR:
+ return MESA_FORMAT_RGBA_ASTC_6x5;
+ case GL_COMPRESSED_RGBA_ASTC_6x6_KHR:
+ return MESA_FORMAT_RGBA_ASTC_6x6;
+ case GL_COMPRESSED_RGBA_ASTC_8x5_KHR:
+ return MESA_FORMAT_RGBA_ASTC_8x5;
+ case GL_COMPRESSED_RGBA_ASTC_8x6_KHR:
+ return MESA_FORMAT_RGBA_ASTC_8x6;
+ case GL_COMPRESSED_RGBA_ASTC_8x8_KHR:
+ return MESA_FORMAT_RGBA_ASTC_8x8;
+ case GL_COMPRESSED_RGBA_ASTC_10x5_KHR:
+ return MESA_FORMAT_RGBA_ASTC_10x5;
+ case GL_COMPRESSED_RGBA_ASTC_10x6_KHR:
+ return MESA_FORMAT_RGBA_ASTC_10x6;
+ case GL_COMPRESSED_RGBA_ASTC_10x8_KHR:
+ return MESA_FORMAT_RGBA_ASTC_10x8;
+ case GL_COMPRESSED_RGBA_ASTC_10x10_KHR:
+ return MESA_FORMAT_RGBA_ASTC_10x10;
+ case GL_COMPRESSED_RGBA_ASTC_12x10_KHR:
+ return MESA_FORMAT_RGBA_ASTC_12x10;
+ case GL_COMPRESSED_RGBA_ASTC_12x12_KHR:
+ return MESA_FORMAT_RGBA_ASTC_12x12;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+ return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12;
+
default:
return MESA_FORMAT_NONE;
}
case MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT:
return GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT;
+ case MESA_FORMAT_RGBA_ASTC_4x4:
+ return GL_COMPRESSED_RGBA_ASTC_4x4_KHR;
+ case MESA_FORMAT_RGBA_ASTC_5x4:
+ return GL_COMPRESSED_RGBA_ASTC_5x4_KHR;
+ case MESA_FORMAT_RGBA_ASTC_5x5:
+ return GL_COMPRESSED_RGBA_ASTC_5x5_KHR;
+ case MESA_FORMAT_RGBA_ASTC_6x5:
+ return GL_COMPRESSED_RGBA_ASTC_6x5_KHR;
+ case MESA_FORMAT_RGBA_ASTC_6x6:
+ return GL_COMPRESSED_RGBA_ASTC_6x6_KHR;
+ case MESA_FORMAT_RGBA_ASTC_8x5:
+ return GL_COMPRESSED_RGBA_ASTC_8x5_KHR;
+ case MESA_FORMAT_RGBA_ASTC_8x6:
+ return GL_COMPRESSED_RGBA_ASTC_8x6_KHR;
+ case MESA_FORMAT_RGBA_ASTC_8x8:
+ return GL_COMPRESSED_RGBA_ASTC_8x8_KHR;
+ case MESA_FORMAT_RGBA_ASTC_10x5:
+ return GL_COMPRESSED_RGBA_ASTC_10x5_KHR;
+ case MESA_FORMAT_RGBA_ASTC_10x6:
+ return GL_COMPRESSED_RGBA_ASTC_10x6_KHR;
+ case MESA_FORMAT_RGBA_ASTC_10x8:
+ return GL_COMPRESSED_RGBA_ASTC_10x8_KHR;
+ case MESA_FORMAT_RGBA_ASTC_10x10:
+ return GL_COMPRESSED_RGBA_ASTC_10x10_KHR;
+ case MESA_FORMAT_RGBA_ASTC_12x10:
+ return GL_COMPRESSED_RGBA_ASTC_12x10_KHR;
+ case MESA_FORMAT_RGBA_ASTC_12x12:
+ return GL_COMPRESSED_RGBA_ASTC_12x12_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12:
+ return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;
+
default:
_mesa_problem(ctx, "Unexpected mesa texture format in"
" _mesa_compressed_format_to_glenum()");