summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_etc.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: change gl_format to mesa_formatMark Mueller2014-01-271-2/+2
| | | | s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
* mesa: remove #include "mfeatures.h" from numerous source filesBrian Paul2013-04-171-1/+0
| | | | | | None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* mesa: remove old swrast-based compressed texel fetch codeBrian Paul2012-12-141-46/+0
|
* mesa: add new texel fetch code for etc formatsBrian Paul2012-12-141-0/+6
|
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2Anuj Phogat2012-12-071-0/+8
| | | | | | | | Data in GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 format is decoded and stored in MESA_FORMAT_SARGB. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2Anuj Phogat2012-12-071-0/+8
| | | | | | | | Data in GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 format is decoded and stored in MESA_FORMAT_RGBA8888_REV. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_SIGNED_RG11_EACAnuj Phogat2012-12-071-0/+8
| | | | | | | | Data in GL_COMPRESSED_SIGNED_RG11_EAC format is decoded and stored in MESA_FORMAT_SIGNED_GR1616. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_SIGNED_R11_EACAnuj Phogat2012-12-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Data in GL_COMPRESSED_SIGNED_R11_EAC format is decoded and stored in MESA_FORMAT_SIGNED_R16. v2: 16 bit signed data is converted to 16 bit unsigned data by adding 2 ^ 15 and stored in an unsigned texture format. v3: 1. Handle a corner case when base code word value is -128. As per OpenGL ES 3.0 specification -128 is not an allowed value and should be truncated to -127. 2. Converting a decoded 16 bit signed data to 16 bit unsigned data by adding 2 ^ 15 gives us an output which matches the decompressed image (.ppm) generated by ericsson's etcpack tool. ericsson is also doing this conversion in their tool because .ppm image files don't support signed data. But gles 3.0 specification doesn't suggest this conversion. We need to keep the decoded data in signed format. Both signed format tests in gles3 conformance pass with these changes. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Tested-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_RG11_EACAnuj Phogat2012-12-071-1/+6
| | | | | | | | Data in GL_COMPRESSED_RG11_EAC format is decoded and stored in MESA_FORMAT_RG1616. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_R11_EACAnuj Phogat2012-12-071-0/+6
| | | | | | | | Data in GL_COMPRESSED_R11_EAC format is decoded and stored in MESA_FORMAT_R16. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EACAnuj Phogat2012-12-071-0/+8
| | | | | | | | Data in GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC format is decoded and stored in MESA_FORMAT_SARGB8. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_RGBA8_ETC2_EACAnuj Phogat2012-12-071-0/+7
| | | | | | | | Data in GL_COMPRESSED_RGBA8_ETC2_EAC format is decoded and stored in MESA_FORMAT_RGBA8888_REV. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_ETC2Anuj Phogat2012-12-071-0/+7
| | | | | | | | Data in GL_COMPRESSED_SRGB8_ETC2 format is decoded and stored in MESA_FORMAT_SARGB8. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add decoding functions for GL_COMPRESSED_RGB8_ETC2Anuj Phogat2012-12-071-2/+14
| | | | | | | | | Data in GL_COMPRESSED_RGB8_ETC2 format is decoded and stored in MESA_FORMAT_RGBX8888_REV. v2: Use CLAMP macro and stdbool.h Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: include inttypes.h to get uint8_t typeBrian Paul2012-07-161-0/+1
| | | | To fix MSVC build.
* mesa: Add function for decoding ETC1 texturesChad Versace2012-07-161-0/+8
| | | | | | | | | Add function _mesa_etc1_unpack_rgba8888. It is intended to be used by glCompressedTexSubImage2D to decode ETC1 textures into RGBA. CC: Chia-I <olv@lunarg.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* mesa: Remove unneeded extern qualifiersChad Versace2012-07-101-2/+2
| | | | | | | Remove 'extern' from the functions declared in texcompress_etc.h. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* mesa: add ETC1 decoding routinesChia-I Wu2011-12-021-0/+40
The format is defined by GL_OES_compressed_ETC1_RGB8_texture. These routines will be used in the following commit. Reviewed-by: Brian Paul <brianp@vmware.com>