mesa: Add new MESA_FORMATs for ETC2 compressed textures
authorAnuj Phogat <anuj.phogat@gmail.com>
Tue, 6 Nov 2012 01:45:18 +0000 (17:45 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 8 Dec 2012 00:29:47 +0000 (16:29 -0800)
commite519b8a9af0f994d6b33e748ada463ff19df7ab8
tree93b8fcc4d178b33bf82e69fb1c4e3febb15d22ae
parent23b7103ceec5d16efaa3a04813a093217c717688
mesa: Add new MESA_FORMATs for ETC2 compressed textures

It is required by OpenGL ES 3.0 to support ETC2 textures.
This patch adds new MESA_FORMATs for following etc2 texture
formats:
 GL_COMPRESSED_RGB8_ETC2
 GL_COMPRESSED_SRGB8_ETC2
 GL_COMPRESSED_RGBA8_ETC2_EAC
 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
 GL_COMPRESSED_R11_EAC
 GL_COMPRESSED_RG11_EAC
 GL_COMPRESSED_SIGNED_R11_EAC
 GL_COMPRESSED_SIGNED_RG11_EAC
 MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1
 MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1

Above formats are currently available in only gles 3.0.

v2: Add entries in texfetch_funcs[] array.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
v3 (Paul Berry <stereotype441@gmail.com>): comment out symbols that
are not implemented yet, so that this commit compiles on its own;
future commits will uncomment the symbols as they become available.
src/mesa/main/format_unpack.c
src/mesa/main/formats.c
src/mesa/main/formats.h
src/mesa/main/glformats.c
src/mesa/main/texcompress.c
src/mesa/main/texformat.c
src/mesa/main/teximage.c
src/mesa/main/texstore.c
src/mesa/swrast/s_texfetch.c