[Mesa-dev] [PATCH 5/6] mesa/texcompress: add compressed formats to base format utility function

Anuj Phogat anuj.phogat at gmail.com
Tue Sep 15 15:01:47 PDT 2015


On Fri, Aug 28, 2015 at 7:50 AM, Nanley Chery <nanleychery at gmail.com> wrote:

> From: Nanley Chery <nanley.g.chery at intel.com>
>
> Adds S3TC and PALETTE formats.
>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/mesa/main/texcompress.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
> index e0294a8..84973d3 100644
> --- a/src/mesa/main/texcompress.c
> +++ b/src/mesa/main/texcompress.c
> @@ -100,6 +100,12 @@ _mesa_gl_compressed_format_base_format(GLenum format)
>     case GL_ETC1_RGB8_OES:
>     case GL_COMPRESSED_RGB8_ETC2:
>     case GL_COMPRESSED_SRGB8_ETC2:
> +   case GL_RGB_S3TC:
> +   case GL_RGB4_S3TC:
> +   case GL_PALETTE4_RGB8_OES:
> +   case GL_PALETTE4_R5_G6_B5_OES:
> +   case GL_PALETTE8_RGB8_OES:
> +   case GL_PALETTE8_R5_G6_B5_OES:
>        return GL_RGB;
>
>     case GL_COMPRESSED_RGBA:
> @@ -117,6 +123,14 @@ _mesa_gl_compressed_format_base_format(GLenum format)
>     case GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:
>     case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:
>     case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:
> +   case GL_RGBA_S3TC:
> +   case GL_RGBA4_S3TC:
> +   case GL_PALETTE4_RGBA8_OES:
> +   case GL_PALETTE8_RGB5_A1_OES:
> +   case GL_PALETTE4_RGBA4_OES:
> +   case GL_PALETTE4_RGB5_A1_OES:
> +   case GL_PALETTE8_RGBA8_OES:
> +   case GL_PALETTE8_RGBA4_OES:
>        return GL_RGBA;
>
>     case GL_COMPRESSED_ALPHA:
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150915/f1b861d8/attachment.html>


More information about the mesa-dev mailing list