From d49307435a6c6999dcff6aea60e528f54722cd46 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 16 Feb 2016 11:43:38 -0500 Subject: st/mesa: add missing ETC2 entries to format_map Noticed by Ilia when I was trying to figure out why some app was failing to use ETC2. Signed-off-by: Rob Clark Reviewed-by: Ilia Mirkin --- src/mesa/state_tracker/st_format.c | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 2b92bade440..82bf3a185ad 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1484,6 +1484,48 @@ static const struct format_mapping format_map[] = { { PIPE_FORMAT_ETC1_RGB8, 0 } }, + /* ETC2 */ + { + { GL_COMPRESSED_RGB8_ETC2, 0 }, + { PIPE_FORMAT_ETC2_RGB8, 0 } + }, + { + { GL_COMPRESSED_SRGB8_ETC2, 0 }, + { PIPE_FORMAT_ETC2_SRGB8, 0 } + }, + { + { GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, 0 }, + { PIPE_FORMAT_ETC2_RGB8A1, 0 } + }, + { + { GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, 0 }, + { PIPE_FORMAT_ETC2_SRGB8A1, 0 } + }, + { + { GL_COMPRESSED_RGBA8_ETC2_EAC, 0 }, + { PIPE_FORMAT_ETC2_RGBA8, 0 } + }, + { + { GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 0 }, + { PIPE_FORMAT_ETC2_SRGBA8, 0 } + }, + { + { GL_COMPRESSED_R11_EAC, 0 }, + { PIPE_FORMAT_ETC2_R11_UNORM, 0 } + }, + { + { GL_COMPRESSED_SIGNED_R11_EAC, 0 }, + { PIPE_FORMAT_ETC2_R11_SNORM, 0 } + }, + { + { GL_COMPRESSED_RG11_EAC, 0 }, + { PIPE_FORMAT_ETC2_RG11_UNORM, 0 } + }, + { + { GL_COMPRESSED_SIGNED_RG11_EAC, 0 }, + { PIPE_FORMAT_ETC2_RG11_SNORM, 0 } + }, + /* BPTC */ { { GL_COMPRESSED_RGBA_BPTC_UNORM, 0 }, -- cgit v1.2.3