From 62068b3bc534d504e40df34847b4436f1a496f35 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 3 May 2012 13:38:22 +0200 Subject: xserver mesa git update 3 May 2012 --- mesalib/src/gallium/auxiliary/util/u_format.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mesalib/src/gallium/auxiliary') diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h index bd4e51d27..1718fb5e2 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.h +++ b/mesalib/src/gallium/auxiliary/util/u_format.h @@ -549,6 +549,19 @@ util_format_colormask(const struct util_format_description *desc) } +/** + * Checks if color mask covers every channel for the specified format + * + * @param desc a format description to check colormask with + * @param colormask a bit mask for channels, matches format of PIPE_MASK_RGBA + */ +static INLINE boolean +util_format_colormask_full(const struct util_format_description *desc, unsigned colormask) +{ + return (~colormask & util_format_colormask(desc)) == 0; +} + + boolean util_format_is_float(enum pipe_format format); -- cgit v1.2.3