Mesa (master): mesa: Add comments about bit-ordering of new XRGB/ XBGR formats.

Kenneth Graunke kwg at kemper.freedesktop.org
Sun May 12 16:34:20 UTC 2013


Module: Mesa
Branch: master
Commit: a67b18e5a7c47fd38d526bac409c04daedec9f8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a67b18e5a7c47fd38d526bac409c04daedec9f8c

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Apr 28 23:33:39 2013 -0700

mesa: Add comments about bit-ordering of new XRGB/XBGR formats.

Marek added these new formats in commit f9fa725690c470daf308, but
without comments relating to the packing.  Sometimes the naming is
confusing, so these comments are helpful in determining whether two
formats are compatible.

The new comments are based on my reading of format_unpack.c.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Marek Olšák <maraeo at gmail.com>

---

 src/mesa/main/formats.h |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 5bfeedf..8dd71a0 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -289,21 +289,21 @@ typedef enum
    MESA_FORMAT_ARGB2101010_UINT,
    MESA_FORMAT_ABGR2101010_UINT,
 
-   MESA_FORMAT_XRGB4444_UNORM,
-   MESA_FORMAT_XRGB1555_UNORM,
-   MESA_FORMAT_XBGR8888_SNORM,
-   MESA_FORMAT_XBGR8888_SRGB,
-   MESA_FORMAT_XBGR8888_UINT,
-   MESA_FORMAT_XBGR8888_SINT,
-   MESA_FORMAT_XRGB2101010_UNORM,
-   MESA_FORMAT_XBGR16161616_UNORM,
-   MESA_FORMAT_XBGR16161616_SNORM,
-   MESA_FORMAT_XBGR16161616_FLOAT,
-   MESA_FORMAT_XBGR16161616_UINT,
-   MESA_FORMAT_XBGR16161616_SINT,
-   MESA_FORMAT_XBGR32323232_FLOAT,
-   MESA_FORMAT_XBGR32323232_UINT,
-   MESA_FORMAT_XBGR32323232_SINT,
+   MESA_FORMAT_XRGB4444_UNORM,    /*                     xxxx RRRR GGGG BBBB */
+   MESA_FORMAT_XRGB1555_UNORM,    /*                     xRRR RRGG GGGB BBBB */
+   MESA_FORMAT_XBGR8888_SNORM,    /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+   MESA_FORMAT_XBGR8888_SRGB,     /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+   MESA_FORMAT_XBGR8888_UINT,     /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+   MESA_FORMAT_XBGR8888_SINT,     /* xxxx xxxx BBBB BBBB GGGG GGGG RRRR RRRR */
+   MESA_FORMAT_XRGB2101010_UNORM, /* xxRR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
+   MESA_FORMAT_XBGR16161616_UNORM,/* ushort[3]=x, [2]=B, [1]=G, [0]=R */
+   MESA_FORMAT_XBGR16161616_SNORM,/* ... */
+   MESA_FORMAT_XBGR16161616_FLOAT,/* ... */
+   MESA_FORMAT_XBGR16161616_UINT, /* ... */
+   MESA_FORMAT_XBGR16161616_SINT, /* ... */
+   MESA_FORMAT_XBGR32323232_FLOAT,/* float[3]=x, [2]=B, [1]=G, [0]=R */
+   MESA_FORMAT_XBGR32323232_UINT, /* ... */
+   MESA_FORMAT_XBGR32323232_SINT, /* ... */
 
    MESA_FORMAT_COUNT
 } gl_format;




More information about the mesa-commit mailing list