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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a67b18e5a7c47fd38d526bac409c04daedec9f8c;p=mesa.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 5bfeedf85db..8dd71a086f5 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;