* MESA_FORMAT_LAYOUT_ETC1
* MESA_FORMAT_LAYOUT_ETC2
* MESA_FORMAT_LAYOUT_BPTC
+ * MESA_FORMAT_LAYOUT_ASTC
* MESA_FORMAT_LAYOUT_OTHER
*/
extern enum mesa_format_layout
case MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM:
format = MESA_FORMAT_BPTC_RGBA_UNORM;
break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4:
+ format = MESA_FORMAT_RGBA_ASTC_4x4;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4:
+ format = MESA_FORMAT_RGBA_ASTC_5x4;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5:
+ format = MESA_FORMAT_RGBA_ASTC_5x5;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5:
+ format = MESA_FORMAT_RGBA_ASTC_6x5;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6:
+ format = MESA_FORMAT_RGBA_ASTC_6x6;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5:
+ format = MESA_FORMAT_RGBA_ASTC_8x5;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6:
+ format = MESA_FORMAT_RGBA_ASTC_8x6;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8:
+ format = MESA_FORMAT_RGBA_ASTC_8x8;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5:
+ format = MESA_FORMAT_RGBA_ASTC_10x5;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6:
+ format = MESA_FORMAT_RGBA_ASTC_10x6;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8:
+ format = MESA_FORMAT_RGBA_ASTC_10x8;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10:
+ format = MESA_FORMAT_RGBA_ASTC_10x10;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10:
+ format = MESA_FORMAT_RGBA_ASTC_12x10;
+ break;
+ case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12:
+ format = MESA_FORMAT_RGBA_ASTC_12x12;
+ break;
case MESA_FORMAT_B8G8R8X8_SRGB:
format = MESA_FORMAT_B8G8R8X8_UNORM;
break;
MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM , bptc , 4, 4, x128, , , , xyzw, srgb
MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT , bptc , 4, 4, x128, , , , xyz1, rgb
MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT , bptc , 4, 4, x128, , , , xyz1, rgb
+
+# ASTC compressed formats
+MESA_FORMAT_RGBA_ASTC_4x4 , astc , 4, 4, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_5x4 , astc , 5, 4, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_5x5 , astc , 5, 5, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_6x5 , astc , 6, 5, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_6x6 , astc , 6, 6, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_8x5 , astc , 8, 5, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_8x6 , astc , 8, 6, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_8x8 , astc , 8, 8, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_10x5 , astc ,10, 5, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_10x6 , astc ,10, 6, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_10x8 , astc ,10, 8, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_10x10 , astc ,10,10, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_12x10 , astc ,12,10, x128, , , , xyzw, rgb
+MESA_FORMAT_RGBA_ASTC_12x12 , astc ,12,12, x128, , , , xyzw, rgb
+
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4 , astc , 4, 4, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4 , astc , 5, 4, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5 , astc , 5, 5, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5 , astc , 6, 5, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6 , astc , 6, 6, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5 , astc , 8, 5, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6 , astc , 8, 6, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8 , astc , 8, 8, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5 , astc ,10, 5, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6 , astc ,10, 6, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8 , astc ,10, 8, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10 , astc ,10,10, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10 , astc ,12,10, x128, , , , xyzw, srgb
+MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12 , astc ,12,12, x128, , , , xyzw, srgb
MESA_FORMAT_LAYOUT_ETC1,
MESA_FORMAT_LAYOUT_ETC2,
MESA_FORMAT_LAYOUT_BPTC,
+ MESA_FORMAT_LAYOUT_ASTC,
MESA_FORMAT_LAYOUT_OTHER,
};
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_COUNT
} mesa_format;
fetch_compressed,
fetch_compressed,
fetch_compressed
- }
+ },
+
+ /* ASTC compressed formats */
+ FETCH_NULL(RGBA_ASTC_4x4),
+ FETCH_NULL(RGBA_ASTC_5x4),
+ FETCH_NULL(RGBA_ASTC_5x5),
+ FETCH_NULL(RGBA_ASTC_6x5),
+ FETCH_NULL(RGBA_ASTC_6x6),
+ FETCH_NULL(RGBA_ASTC_8x5),
+ FETCH_NULL(RGBA_ASTC_8x6),
+ FETCH_NULL(RGBA_ASTC_8x8),
+ FETCH_NULL(RGBA_ASTC_10x5),
+ FETCH_NULL(RGBA_ASTC_10x6),
+ FETCH_NULL(RGBA_ASTC_10x8),
+ FETCH_NULL(RGBA_ASTC_10x10),
+ FETCH_NULL(RGBA_ASTC_12x10),
+ FETCH_NULL(RGBA_ASTC_12x12),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_4x4),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_5x4),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_5x5),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_6x5),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_6x6),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_8x5),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_8x6),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_8x8),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_10x5),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_10x6),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_10x8),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_10x10),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_12x10),
+ FETCH_NULL(SRGB8_ALPHA8_ASTC_12x12)
};