[PIPE_FORMAT_ETC2_RGB8A1] = { MALI_ETC2_RGB8A1, _T },
[PIPE_FORMAT_ETC2_SRGB8A1] = { MALI_ETC2_RGB8A1, _T },
- [PIPE_FORMAT_ASTC_4x4] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_5x4] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_5x5] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_6x5] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_6x6] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_8x5] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_8x6] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_8x8] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x5] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x6] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x8] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x10] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_12x10] = { MALI_ASTC_HDR_SUPP, _T },
- [PIPE_FORMAT_ASTC_12x12] = { MALI_ASTC_HDR_SUPP, _T },
-
- [PIPE_FORMAT_ASTC_4x4_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_5x4_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_5x5_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_6x5_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_6x6_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_8x5_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_8x6_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_8x8_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x5_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x6_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x8_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_10x10_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_12x10_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
- [PIPE_FORMAT_ASTC_12x12_SRGB] = { MALI_ASTC_SRGB_SUPP, _T },
+ [PIPE_FORMAT_ASTC_4x4] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_5x4] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_5x5] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_6x5] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_6x6] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_8x5] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_8x6] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_8x8] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_10x5] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_10x6] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_10x8] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_10x10] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_12x10] = { MALI_ASTC_2D_HDR, _T },
+ [PIPE_FORMAT_ASTC_12x12] = { MALI_ASTC_2D_HDR, _T },
+
+ [PIPE_FORMAT_ASTC_4x4_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_5x4_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_5x5_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_6x5_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_6x6_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_8x5_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_8x6_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_8x8_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_10x5_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_10x6_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_10x8_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_10x10_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_12x10_SRGB] = { MALI_ASTC_2D_LDR, _T },
+ [PIPE_FORMAT_ASTC_12x12_SRGB] = { MALI_ASTC_2D_LDR, _T },
[PIPE_FORMAT_B5G6R5_UNORM] = { MALI_RGB565, _VTR },
[PIPE_FORMAT_B5G5R5X1_UNORM] = { MALI_RGB5_X1_UNORM, _VT },
[PIPE_FORMAT_R5G5B5A1_UNORM] = { MALI_RGB5_A1_UNORM, _VTR },
#define MALI_EXTRACT_BITS(fmt) (fmt & 0x7)
enum mali_format {
+ /* Not all formats are in fact available, need to query dynamically to
+ * check. Factory settings for Juno enables only ETC2 and ASTC, no
+ * DXT/RGTC formats.
+ * */
+
+ /* 0x0 invalid */
MALI_ETC2_RGB8 = MALI_FORMAT_COMPRESSED | 0x1,
MALI_ETC2_R11_UNORM = MALI_FORMAT_COMPRESSED | 0x2,
MALI_ETC2_RGBA8 = MALI_FORMAT_COMPRESSED | 0x3,
MALI_ETC2_RG11_UNORM = MALI_FORMAT_COMPRESSED | 0x4,
- MALI_ETC2_R11_SNORM = MALI_FORMAT_COMPRESSED | 0x11,
- MALI_ETC2_RG11_SNORM = MALI_FORMAT_COMPRESSED | 0x12,
+ /* 0x5 reserved */
+ MALI_NXR = MALI_FORMAT_COMPRESSED | 0x6, /* Nokia eXtended Range */
+ MALI_BC1_UNORM = MALI_FORMAT_COMPRESSED | 0x7, /* DXT1 */
+ MALI_BC2_UNORM = MALI_FORMAT_COMPRESSED | 0x8, /* DXT3 */
+ MALI_BC3_UNORM = MALI_FORMAT_COMPRESSED | 0x9, /* DXT5 */
+ MALI_BC4_UNORM = MALI_FORMAT_COMPRESSED | 0xA, /* RGTC1_UNORM */
+ MALI_BC4_SNORM = MALI_FORMAT_COMPRESSED | 0xB, /* RGTC1_SNORM */
+ MALI_BC5_UNORM = MALI_FORMAT_COMPRESSED | 0xC, /* RGTC2_UNORM */
+ MALI_BC5_SNORM = MALI_FORMAT_COMPRESSED | 0xD, /* RGTC2_SNORM */
+ MALI_BC6H_UF16 = MALI_FORMAT_COMPRESSED | 0xE,
+ MALI_BC6H_SF16 = MALI_FORMAT_COMPRESSED | 0xF,
+ MALI_BC7_UNORM = MALI_FORMAT_COMPRESSED | 0x10,
+ MALI_ETC2_R11_SNORM = MALI_FORMAT_COMPRESSED | 0x11, /* EAC_SNORM */
+ MALI_ETC2_RG11_SNORM = MALI_FORMAT_COMPRESSED | 0x12, /* EAC_SNORM */
MALI_ETC2_RGB8A1 = MALI_FORMAT_COMPRESSED | 0x13,
- MALI_ASTC_SRGB_SUPP = MALI_FORMAT_COMPRESSED | 0x16,
- MALI_ASTC_HDR_SUPP = MALI_FORMAT_COMPRESSED | 0x17,
+ MALI_ASTC_3D_LDR = MALI_FORMAT_COMPRESSED | 0x14,
+ MALI_ASTC_3D_HDR = MALI_FORMAT_COMPRESSED | 0x15,
+ MALI_ASTC_2D_LDR = MALI_FORMAT_COMPRESSED | 0x16,
+ MALI_ASTC_2D_HDR = MALI_FORMAT_COMPRESSED | 0x17,
MALI_RGB565 = MALI_FORMAT_SPECIAL | 0x0,
MALI_RGB5_X1_UNORM = MALI_FORMAT_SPECIAL | 0x1,