summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_format.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-02-23 19:51:42 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-02-24 12:15:13 +0000
commit5dce9b252b65102ed69956fdd47862d5cb1c4af1 (patch)
tree32c7a22674c3eaac5dbd127ae2c872bdd05bde92 /src/gallium/auxiliary/util/u_format.h
parent3f5bac8960a5c6d1f08f0dc849676139b9d6ce5c (diff)
util: Store more derived data in the the format description.
Diffstat (limited to 'src/gallium/auxiliary/util/u_format.h')
-rw-r--r--src/gallium/auxiliary/util/u_format.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 2fbbb83d4b..7054a07b2d 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -138,8 +138,26 @@ struct util_format_description
const char *name;
struct util_format_block block;
enum util_format_layout layout;
+
+ /**
+ * The number of channels.
+ */
+ unsigned nr_channels:3;
+
+ /**
+ * Whether all channels have the same number of whole bytes.
+ */
+ unsigned is_array:1;
+
+ /**
+ * Whether channels have mixed types (ignoring UTIL_FORMAT_TYPE_VOID).
+ */
+ unsigned is_mixed:1;
+
struct util_format_channel_description channel[4];
+
unsigned char swizzle[4];
+
enum util_format_colorspace colorspace;
};