summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/colormac.h
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-12-21 18:54:50 +0100
committerMarek Olšák <maraeo@gmail.com>2010-12-23 16:54:58 +0100
commit621e5254ef6714520f106bd3707fe6ddc279aa0c (patch)
tree8b2dfc92e969c173f27476ee77bdf42bb472b6bd /src/mesa/main/colormac.h
parent0a7b60f7ed3167acce72b3c367181dcae81f92c1 (diff)
downloadexternal_mesa3d-621e5254ef6714520f106bd3707fe6ddc279aa0c.zip
external_mesa3d-621e5254ef6714520f106bd3707fe6ddc279aa0c.tar.gz
external_mesa3d-621e5254ef6714520f106bd3707fe6ddc279aa0c.tar.bz2
mesa: implement new texture format ARGB2101010
Radeon GPUs do support GL_RGB10_A2.
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r--src/mesa/main/colormac.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 245fb65..f00faa5 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -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))