summaryrefslogtreecommitdiff
path: root/src/mesa/main/colormac.h
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@vmware.com>2009-01-22 09:43:42 +0000
committerAlan Hourihane <alanh@vmware.com>2009-01-22 09:43:42 +0000
commit4df482086ebf0663c708b089d8d8d22de0ef972c (patch)
treee802cc36b266bfdeb80ab9e55643c50f5a5e6d9c /src/mesa/main/colormac.h
parent01cbd764962ff49bf104e5997914ced53360ef81 (diff)
parentb8bd0b0ddc357f9b430bb6ddeb60c5a2179d3791 (diff)
Merge commit 'origin/master' into gallium-0.2
Conflicts: windows/VC8/mesa/osmesa/osmesa.vcproj windows/VC8/progs/demos/gears.vcproj windows/VC8/progs/progs.sln
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 a34bd2ed38..74692e9a98 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -195,6 +195,10 @@ do { \
#define PACK_COLOR_565_REV( X, Y, Z ) \
(((X) & 0xf8) | ((Y) & 0xe0) >> 5 | (((Y) & 0x1c) << 11) | (((Z) & 0xf8) << 5))
+#define PACK_COLOR_5551( R, G, B, A ) \
+ ((((R) & 0xf8) << 8) | (((G) & 0xf8) << 3) | (((B) & 0xf8) >> 2) | \
+ ((A) ? 1 : 0))
+
#define PACK_COLOR_1555( A, B, G, R ) \
((((B) & 0xf8) << 7) | (((G) & 0xf8) << 2) | (((R) & 0xf8) >> 3) | \
((A) ? 0x8000 : 0))