From: Kenneth Graunke Date: Mon, 29 Apr 2013 06:33:39 +0000 (-0700) Subject: mesa: Add comments about bit-ordering of new XRGB/XBGR formats. X-Git-Tag: mesa-9.2.1~1223 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F6555%2F1;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Ian Romanick Reviewed-by: Marek Olšák --- 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;