mesa: implement new texture format ARGB2101010
[mesa.git] / src / mesa / main / colormac.h
index 245fb658bb36cce64e0f90593732e9cc332fd691..f00faa5beef6108577798529b1eec626a646611b 100644 (file)
@@ -198,6 +198,10 @@ do {                                               \
    ((((B) & 0xf8) >> 1) | (((G) & 0xc0) >> 6) | (((G) & 0x38) << 10) | (((R) & 0xf8) << 5) |   \
     ((A) ? 0x80 : 0))
 
+#define PACK_COLOR_2101010( A, B, G, R )                                       \
+   (((B) << 22) | ((G) << 12) | ((R) << 2) |   \
+    (((A) & 0xc0) << 24))
+
 #define PACK_COLOR_4444( R, G, B, A )                                  \
    ((((R) & 0xf0) << 8) | (((G) & 0xf0) << 4) | ((B) & 0xf0) | ((A) >> 4))