summaryrefslogtreecommitdiff
path: root/src/mesa/main/colormac.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-01-08 15:42:57 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-01-08 15:42:57 +0000
commit080c40ab32b2abd6d8381b4a0cc143d36a1652b2 (patch)
treee173767ebc5a82d81b9fc086449d915e29348976 /src/mesa/main/colormac.h
parent9cdf6f025b2ed55cfb13dd09f870f01d0c7947d3 (diff)
parenta1de400e8de06a80ab140bb0fa950e990607572d (diff)
Merge remote branch 'origin/master' into lp-binning
Conflicts: src/gallium/auxiliary/util/u_surface.c src/gallium/drivers/llvmpipe/Makefile src/gallium/drivers/llvmpipe/SConscript src/gallium/drivers/llvmpipe/lp_bld_arit.c src/gallium/drivers/llvmpipe/lp_bld_flow.c src/gallium/drivers/llvmpipe/lp_bld_interp.c src/gallium/drivers/llvmpipe/lp_clear.c src/gallium/drivers/llvmpipe/lp_context.c src/gallium/drivers/llvmpipe/lp_context.h src/gallium/drivers/llvmpipe/lp_draw_arrays.c src/gallium/drivers/llvmpipe/lp_jit.c src/gallium/drivers/llvmpipe/lp_jit.h src/gallium/drivers/llvmpipe/lp_prim_vbuf.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_setup_point.c src/gallium/drivers/llvmpipe/lp_state.h src/gallium/drivers/llvmpipe/lp_state_blend.c src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/gallium/drivers/llvmpipe/lp_state_sampler.c src/gallium/drivers/llvmpipe/lp_state_surface.c src/gallium/drivers/llvmpipe/lp_tex_cache.c src/gallium/drivers/llvmpipe/lp_tex_cache.h src/gallium/drivers/llvmpipe/lp_tex_sample.h src/gallium/drivers/llvmpipe/lp_tile_cache.c
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r--src/mesa/main/colormac.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 815624ee50..905f4e2283 100644
--- a/src/mesa/main/colormac.h
+++ b/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))