util: Add a new flag, for formats that can be described as a bitmask.
[mesa.git] / src / gallium / auxiliary / util / u_format.h
index ec6b0777349410dd14e2b0219f9e4c920af52feb..b2aa5bfb188cba57ab3b78a75a937b1b97964d81 100644 (file)
@@ -145,6 +145,15 @@ struct util_format_description
     */
    unsigned is_array:1;
 
+   /**
+    * Whether the pixel format can be described as a bitfield structure.
+    *
+    * In particular:
+    * - pixel depth must be 8, 16, or 32 bits;
+    * - all channels must be unsigned, signed, or void
+    */
+   unsigned is_bitmask:1;
+
    /**
     * Whether channels have mixed types (ignoring UTIL_FORMAT_TYPE_VOID).
     */