[Mesa-dev] [PATCH] mesa: update packed format layout comments
Brian Paul
brianp at vmware.com
Mon Mar 3 09:54:20 PST 2014
On 03/03/2014 10:45 AM, Roland Scheidegger wrote:
> Just one minor bug, otherwise
>
> Reviewed-by: Roland Scheidegger <sroland at vmware.com>
>
> Am 28.02.2014 18:59, schrieb Brian Paul:
>> Update the comments for the packed formats to accurately reflect the
>> layout of the bits in the pixel. For example, for the packed format
>> MESA_FORMAT_R8G8B8A8, R is in the least significant position while A
>> is in the most-significant position of the 32-bit word.
>> ---
>> src/mesa/main/formats.h | 98 +++++++++++++++++++++++------------------------
>> 1 file changed, 49 insertions(+), 49 deletions(-)
>>
>> diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
>> index 3f44de9..72a6600 100644
>> --- a/src/mesa/main/formats.h
>> +++ b/src/mesa/main/formats.h
>> @@ -339,33 +339,33 @@ typedef enum
>>
>> /* Type P formats */ /* msb <------ TEXEL BITS -----------> lsb */
>> /* ---- ---- ---- ---- ---- ---- ---- ---- */
>> - MESA_FORMAT_A8B8G8R8_UNORM, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
>> - MESA_FORMAT_R8G8B8A8_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
>> - MESA_FORMAT_B8G8R8A8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
>> - MESA_FORMAT_A8R8G8B8_UNORM, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
>> - MESA_FORMAT_X8B8G8R8_UNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
>> - MESA_FORMAT_R8G8B8X8_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
>> - MESA_FORMAT_B8G8R8X8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
>> - MESA_FORMAT_X8R8G8B8_UNORM, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
>> + MESA_FORMAT_A8B8G8R8_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
>> + MESA_FORMAT_R8G8B8A8_UNORM, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
>> + MESA_FORMAT_B8G8R8A8_UNORM, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
>> + MESA_FORMAT_A8R8G8B8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
>> + MESA_FORMAT_X8B8G8R8_UNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
>> + MESA_FORMAT_R8G8B8X8_UNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
>> + MESA_FORMAT_B8G8R8X8_UNORM, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
>> + MESA_FORMAT_X8R8G8B8_UNORM, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
>>
>> /* Type A formats */
>> MESA_FORMAT_BGR_UNORM8, /* uchar[i * 3] = B, [i * 3 + 1] = G, [i *3 + 2] = R */
>> MESA_FORMAT_RGB_UNORM8, /* uchar[i * 3] = R, [i * 3 + 1] = G, [i *3 + 2] = B */
>>
>> /* Type P formats */
>> - MESA_FORMAT_B5G6R5_UNORM, /* BBBB BGGG GGGR RRRR */
>> - MESA_FORMAT_R5G6B5_UNORM, /* RRRR RGGG GGGB BBBB */
>> - MESA_FORMAT_B4G4R4A4_UNORM, /* BBBB GGGG RRRR AAAA */
>> - MESA_FORMAT_A4R4G4B4_UNORM, /* AAAA RRRR GGGG BBBB */
>> + MESA_FORMAT_B5G6R5_UNORM, /* RRRR RGGG GGGB BBBB */
>> + MESA_FORMAT_R5G6B5_UNORM, /* BBBB BGGG GGGR RRRR */
>> + MESA_FORMAT_B4G4R4A4_UNORM, /* AAAA RRRR GGGG BBBB */
>> + MESA_FORMAT_A4R4G4B4_UNORM, /* BBBB GGGG RRRR AAAA */
>> MESA_FORMAT_A1B5G5R5_UNORM, /* ABBB BBGG GGGR RRRR */
> This one seems wrong too.
Thanks. I'll fix that before pushing.
-Brian
More information about the mesa-dev
mailing list