[Mesa-dev] [PATCH 09/11] mesa: Fix alpha component in unpack_R8G8B8X8_SRGB.

Jason Ekstrand jason at jlekstrand.net
Tue Sep 16 16:51:04 PDT 2014


Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

This is why we should be auto-generating these...

On Mon, Sep 15, 2014 at 11:28 PM, Dave Airlie <airlied at gmail.com> wrote:

> From: Richard Sandiford <rsandifo at linux.vnet.ibm.com>
>
> The function was using the "X" component as the alpha channel,
> rather than setting alpha to 1.0.
>
> Signed-off-by: Richard Sandiford <rsandifo at linux.vnet.ibm.com>
> Reviewed-by: Brian Paul <brianp at vmware.com>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/main/format_unpack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
> index 68fbcb3..cfa6a60 100644
> --- a/src/mesa/main/format_unpack.c
> +++ b/src/mesa/main/format_unpack.c
> @@ -2127,7 +2127,7 @@ unpack_R8G8B8X8_SRGB(const void *src, GLfloat
> dst[][4], GLuint n)
>        dst[i][RCOMP] = util_format_srgb_8unorm_to_linear_float( (s[i]
> ) & 0xff );
>        dst[i][GCOMP] = util_format_srgb_8unorm_to_linear_float( (s[i] >>
> 8) & 0xff );
>        dst[i][BCOMP] = util_format_srgb_8unorm_to_linear_float( (s[i] >>
> 16) & 0xff );
> -      dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] >> 24 ); /* linear! */
> +      dst[i][ACOMP] = 1.0f;
>     }
>  }
>
> --
> 1.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140916/dec58193/attachment.html>


More information about the mesa-dev mailing list