On 03/03/2014 08:32 AM, Chia-I Wu wrote:
Hi list,
From formats.h, we have
/* Type P formats */ /* msb <------ TEXEL BITS -----------> lsb */
/* ---- ---- ---- ---- ---- ---- ---- ---- */
MESA_FORMAT_A8B8G8R8_UNORM, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
But in format_unpack.c, MESA_FORMAT_A8B8G8R8_UNORM is unpacked with
unpack_RGBA8888, which has
dst[i][RCOMP] = UBYTE_TO_FLOAT( (s[i] >> 24) );
dst[i][GCOMP] = UBYTE_TO_FLOAT( (s[i] >> 16) & 0xff );
dst[i][BCOMP] = UBYTE_TO_FLOAT( (s[i] >> 8) & 0xff );
dst[i][ACOMP] = UBYTE_TO_FLOAT( (s[i] ) & 0xff );
I am confused whether R should be at MSB, as the code does, or A
should be at MSB, as the comment says.
The format is mapped to PIPE_FORMAT_ABGR8888_UNORM, which suggests we
have the right code but wrong comment.
I posted a patch last week which fixes the comments to make them agree
with the code. Still waiting for R-b.
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev