[Mesa-dev] [PATCH 11/14] meta: Use _mesa_need_luminance_to_rgb_conversion() in decompress_texture_image()

Iago Toral itoral at igalia.com
Wed Jul 22 07:12:00 PDT 2015


Patches 10-11 are

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Tue, 2015-06-16 at 11:15 -0700, Anuj Phogat wrote:
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/mesa/drivers/common/meta.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index c9e58d8..6108d98 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -3132,16 +3132,8 @@ decompress_texture_image(struct gl_context *ctx,
>         * returned as red and two-channel texture values are returned as
>         * red/alpha.
>         */
> -      if (((baseTexFormat == GL_LUMINANCE ||
> -            baseTexFormat == GL_LUMINANCE_ALPHA ||
> -            baseTexFormat == GL_INTENSITY) &&
> -           (destBaseFormat == GL_RGBA ||
> -            destBaseFormat == GL_RGB ||
> -            destBaseFormat == GL_RG ||
> -            destBaseFormat == GL_GREEN ||
> -            destBaseFormat == GL_BLUE ||
> -            destBaseFormat == GL_BGRA ||
> -            destBaseFormat == GL_BGR)) ||
> +      if (_mesa_need_luminance_to_rgb_conversion(baseTexFormat,
> +                                                 destBaseFormat) ||
>            /* If we're reading back an RGB(A) texture (using glGetTexImage) as
>  	   * luminance then we need to return L=tex(R).
>  	   */




More information about the mesa-dev mailing list