aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/colormac.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
committermarha <marha@users.sourceforge.net>2010-03-07 13:28:57 +0000
commit14b1cb8d5a27ec9716d3f790fce95f0469e35605 (patch)
tree6c94dc9f37b19b995bec603141442b1b93e8c9d2 /mesalib/src/mesa/main/colormac.h
parent93c85587c691f9b91e7c2d8bda50f453e0f6674d (diff)
downloadvcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.gz
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.tar.bz2
vcxsrv-14b1cb8d5a27ec9716d3f790fce95f0469e35605.zip
Updated to Mesa 7.7
Diffstat (limited to 'mesalib/src/mesa/main/colormac.h')
-rw-r--r--mesalib/src/mesa/main/colormac.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/colormac.h b/mesalib/src/mesa/main/colormac.h
index 815624ee5..905f4e228 100644
--- a/mesalib/src/mesa/main/colormac.h
+++ b/mesalib/src/mesa/main/colormac.h
@@ -140,9 +140,9 @@
*/
#define UNCLAMPED_FLOAT_TO_RGB_CHAN(dst, f) \
do { \
- UNCLAMPED_FLOAT_TO_CHAN(dst[0], f[0]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[1], f[1]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[2], f[2]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[0], (f)[0]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[1], (f)[1]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[2], (f)[2]); \
} while (0)
@@ -156,10 +156,10 @@ do { \
*/
#define UNCLAMPED_FLOAT_TO_RGBA_CHAN(dst, f) \
do { \
- UNCLAMPED_FLOAT_TO_CHAN(dst[0], f[0]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[1], f[1]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[2], f[2]); \
- UNCLAMPED_FLOAT_TO_CHAN(dst[3], f[3]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[0], (f)[0]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[1], (f)[1]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[2], (f)[2]); \
+ UNCLAMPED_FLOAT_TO_CHAN((dst)[3], (f)[3]); \
} while (0)
@@ -210,6 +210,12 @@ do { \
#define PACK_COLOR_88_REV( L, A ) \
(((A) << 8) | (L))
+#define PACK_COLOR_1616( L, A ) \
+ (((L) << 16) | (A))
+
+#define PACK_COLOR_1616_REV( L, A ) \
+ (((A) << 16) | (L))
+
#define PACK_COLOR_332( R, G, B ) \
(((R) & 0xe0) | (((G) & 0xe0) >> 3) | (((B) & 0xc0) >> 6))