From 8ae37365f30594498184fe5428f961a9c310fd8c Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Tue, 19 May 2015 10:35:39 -0700 Subject: mesa/formats: define the 2D ASTC formats Define the mesa formats and make changes necessary for compilation without errors. Also add support for _mesa_get_srgb_format_linear(). v2. conform the ASTC MESA_FORMAT enums to the existing naming convention. v3. remove ASTC cases for _mesa_get_uncompressed_format(). This function is only used for generating mipmaps - something ASTC formats do not support due to lack of online compression. Reviewed-by: Anuj Phogat Signed-off-by: Nanley Chery --- src/mesa/swrast/s_texfetch.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c index 1fe21c0b469..754d982bcd5 100644 --- a/src/mesa/swrast/s_texfetch.c +++ b/src/mesa/swrast/s_texfetch.c @@ -551,7 +551,37 @@ texfetch_funcs[] = 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) }; -- cgit v1.2.3