[Mesa-dev] [PATCH] mesa: Add comments about bit-ordering of new XRGB/XBGR formats.
Ian Romanick
idr at freedesktop.org
Fri May 10 11:07:20 PDT 2013
On 05/10/2013 02:06 AM, Kenneth Graunke wrote:
> 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.
>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Marek Olšák <maraeo at gmail.com>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/main/formats.h | 30 +++++++++++++++---------------
> 1 file 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-dev
mailing list