[Mesa-dev] [PATCH 1/5] mesa: add missing ETC2_SRGB cases in formats.c

Marek Olšák maraeo at gmail.com
Thu Jan 23 02:46:12 PST 2014


For the series:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Jan 23, 2014 at 3:11 AM, Brian Paul <brianp at vmware.com> wrote:
> In the _mesa_get_format_color_encoding() and _mesa_get_srgb_format_linear()
> functions.
> ---
>  src/mesa/main/formats.c |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
> index 1246c4d..7bde1f1 100644
> --- a/src/mesa/main/formats.c
> +++ b/src/mesa/main/formats.c
> @@ -2032,6 +2032,9 @@ _mesa_get_format_color_encoding(gl_format format)
>     case MESA_FORMAT_SRGBA_DXT3:
>     case MESA_FORMAT_SRGBA_DXT5:
>     case MESA_FORMAT_XBGR8888_SRGB:
> +   case MESA_FORMAT_ETC2_SRGB8:
> +   case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
> +   case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
>        return GL_SRGB;
>     default:
>        return GL_LINEAR;
> @@ -2077,6 +2080,15 @@ _mesa_get_srgb_format_linear(gl_format format)
>     case MESA_FORMAT_XBGR8888_SRGB:
>        format = MESA_FORMAT_RGBX8888_REV;
>        break;
> +   case MESA_FORMAT_ETC2_SRGB8:
> +      format = MESA_FORMAT_ETC2_RGB8;
> +      break;
> +   case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
> +      format = MESA_FORMAT_ETC2_RGBA8_EAC;
> +      break;
> +   case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
> +      format = MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1;
> +      break;
>     default:
>        break;
>     }
> --
> 1.7.10.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list