aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_format.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-03 13:38:22 +0200
committermarha <marha@users.sourceforge.net>2012-05-03 13:38:22 +0200
commit62068b3bc534d504e40df34847b4436f1a496f35 (patch)
tree7f67aa0910acff5830585e699be4098088244a85 /mesalib/src/gallium/auxiliary/util/u_format.h
parente67b35e7a899da5805fcce3d390cb10ebcaffe91 (diff)
downloadvcxsrv-62068b3bc534d504e40df34847b4436f1a496f35.tar.gz
vcxsrv-62068b3bc534d504e40df34847b4436f1a496f35.tar.bz2
vcxsrv-62068b3bc534d504e40df34847b4436f1a496f35.zip
xserver mesa git update 3 May 2012
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format.h13
1 files changed, 13 insertions, 0 deletions
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);