[Mesa-dev] [PATCH] mesa: update packed format layout comments
Brian Paul
brianp at vmware.com
Fri Feb 28 09:59:11 PST 2014
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 */
- MESA_FORMAT_B5G5R5A1_UNORM, /* BBBB BGGG GGRR RRRA */
- MESA_FORMAT_A1R5G5B5_UNORM, /* ARRR RRGG GGGB BBBB */
- MESA_FORMAT_L4A4_UNORM, /* LLLL AAAA */
- MESA_FORMAT_L8A8_UNORM, /* LLLL LLLL AAAA AAAA */
- MESA_FORMAT_A8L8_UNORM, /* AAAA AAAA LLLL LLLL */
- MESA_FORMAT_L16A16_UNORM, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
- MESA_FORMAT_A16L16_UNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
- MESA_FORMAT_B2G3R3_UNORM, /* BBGG GRRR */
+ MESA_FORMAT_B5G5R5A1_UNORM, /* ARRR RRGG GGGB BBBB */
+ MESA_FORMAT_A1R5G5B5_UNORM, /* BBBB BGGG GGRR RRRA */
+ MESA_FORMAT_L4A4_UNORM, /* AAAA LLLL */
+ MESA_FORMAT_L8A8_UNORM, /* AAAA AAAA LLLL LLLL */
+ MESA_FORMAT_A8L8_UNORM, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_L16A16_UNORM, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_A16L16_UNORM, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
+ MESA_FORMAT_B2G3R3_UNORM, /* RRRG GGBB */
/* Type A formats */
MESA_FORMAT_A_UNORM8, /* uchar[i] = A */
@@ -383,25 +383,25 @@ typedef enum
MESA_FORMAT_R_UNORM8, /* uchar[i] = R */
/* Type P formats */
- MESA_FORMAT_R8G8_UNORM, /* RRRR RRRR GGGG GGGG */
- MESA_FORMAT_G8R8_UNORM, /* GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_R8G8_UNORM, /* GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_G8R8_UNORM, /* RRRR RRRR GGGG GGGG */
/* Type A format(s) */
MESA_FORMAT_R_UNORM16, /* ushort[i] = R */
/* Type P formats */
- MESA_FORMAT_R16G16_UNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
- MESA_FORMAT_G16R16_UNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
- MESA_FORMAT_B10G10R10A2_UNORM,/* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRAA */
- MESA_FORMAT_S8_UINT_Z24_UNORM,/* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
- MESA_FORMAT_Z24_UNORM_S8_UINT,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
+ MESA_FORMAT_R16G16_UNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
+ MESA_FORMAT_G16R16_UNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
+ MESA_FORMAT_B10G10R10A2_UNORM,/* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_S8_UINT_Z24_UNORM,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */
+ MESA_FORMAT_Z24_UNORM_S8_UINT,/* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
/* Type A format(s) */
MESA_FORMAT_Z_UNORM16, /* ushort[i] = Z */
/* Type P formats */
- MESA_FORMAT_Z24_UNORM_X8_UINT,/* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
- MESA_FORMAT_X8Z24_UNORM, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_Z24_UNORM_X8_UINT,/* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */
+ MESA_FORMAT_X8Z24_UNORM, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */
/* Type A formats */
MESA_FORMAT_Z_UNORM32, /* uint[i] = Z */
@@ -416,14 +416,14 @@ typedef enum
MESA_FORMAT_BGR_SRGB8, /* uchar[i * 3] = B, [i * 3 + 1] = G, [i *3 + 2] = R */
/* Type P formats */
- MESA_FORMAT_A8B8G8R8_SRGB, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR*/
- MESA_FORMAT_B8G8R8A8_SRGB, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
+ MESA_FORMAT_A8B8G8R8_SRGB, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_B8G8R8A8_SRGB, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
/* Type A format(s) */
MESA_FORMAT_L_SRGB8, /* uchar[i] = L */
/* Type P formats */
- MESA_FORMAT_L8A8_SRGB, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_L8A8_SRGB, /* AAAA AAAA LLLL LLLL */
/* Type C formats */
MESA_FORMAT_SRGB_DXT1,
@@ -548,16 +548,16 @@ typedef enum
MESA_FORMAT_R_SNORM8, /* char[i] = R */
/* Type P formats */
- MESA_FORMAT_R8G8_SNORM, /* RRRR RRRR GGGG GGGG */
- MESA_FORMAT_X8B8G8R8_SNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_A8B8G8R8_SNORM, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
- MESA_FORMAT_R8G8B8A8_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_R8G8_SNORM, /* GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_X8B8G8R8_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+ MESA_FORMAT_A8B8G8R8_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
+ MESA_FORMAT_R8G8B8A8_SNORM, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
/* Type A format(s) */
MESA_FORMAT_R_SNORM16, /* short[i] = R */
/* Type P format(s) */
- MESA_FORMAT_R16G16_SNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
+ MESA_FORMAT_R16G16_SNORM, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
/* Type A format(s) */
MESA_FORMAT_RGB_SNORM16, /* short[i * 3] = R, [i * 3 + 1] = G, [i *3 + 2] = B */
@@ -597,7 +597,7 @@ typedef enum
MESA_FORMAT_L_SNORM8, /* char[i] = L */
/* Type P format(s) */
- MESA_FORMAT_L8A8_SNORM, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_L8A8_SNORM, /* AAAA AAAA LLLL LLLL */
/* Type A format(s) */
MESA_FORMAT_I_SNORM8, /* char[i] = I */
@@ -608,21 +608,21 @@ typedef enum
/* Type P format(s) */
MESA_FORMAT_R9G9B9E5_FLOAT,
- MESA_FORMAT_R11G11B10_FLOAT,
+ MESA_FORMAT_R11G11B10_FLOAT, /* BBBB BBBB BBGG GGGG GGGG GRRR RRRR RRRR */
/* Type A format(s) */
MESA_FORMAT_Z_FLOAT32,
/* Type P formats */
- MESA_FORMAT_Z32_FLOAT_S8X24_UINT,
+ MESA_FORMAT_Z32_FLOAT_S8X24_UINT, /* (float, x24s8) */
- MESA_FORMAT_B10G10R10A2_UINT,
- MESA_FORMAT_R10G10B10A2_UINT,
+ MESA_FORMAT_B10G10R10A2_UINT, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+ MESA_FORMAT_R10G10B10A2_UINT, /* AABB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */
- MESA_FORMAT_B4G4R4X4_UNORM, /* BBBB GGGG RRRR xxxx */
- MESA_FORMAT_B5G5R5X1_UNORM, /* BBBB BGGG GGRR RRRx */
- MESA_FORMAT_R8G8B8X8_SNORM, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
- MESA_FORMAT_R8G8B8X8_SRGB, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */
+ MESA_FORMAT_B4G4R4X4_UNORM, /* xxxx RRRR GGGG BBBB */
+ MESA_FORMAT_B5G5R5X1_UNORM, /* xRRR RRGG GGGB BBBB */
+ MESA_FORMAT_R8G8B8X8_SNORM, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+ MESA_FORMAT_R8G8B8X8_SRGB, /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
/* Type A formats */
MESA_FORMAT_RGBX_UINT8, /* uchar[i * 4] = R, [i * 4 + 1] = G, [i * 4 + 2] = B, [i * 4 + 3] = x */
@@ -643,9 +643,9 @@ typedef enum
MESA_FORMAT_RGBX_SINT32, /* ... */
/* Type P formats */
- MESA_FORMAT_R10G10B10A2_UNORM,
- MESA_FORMAT_G8R8_SNORM,
- MESA_FORMAT_G16R16_SNORM,
+ MESA_FORMAT_R10G10B10A2_UNORM, /* AABB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */
+ MESA_FORMAT_G8R8_SNORM, /* RRRR RRRR GGGG GGGG */
+ MESA_FORMAT_G16R16_SNORM, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
MESA_FORMAT_COUNT
} mesa_format;
--
1.7.10.4
More information about the mesa-dev
mailing list