diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2009-01-20 11:12:17 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2009-01-20 11:12:17 +0100 |
commit | dbda49a9e65f684ca46c7af84cc52d63b0622978 (patch) | |
tree | 8b95b5b4a3645544761f7748157119651ee1a21f /src/mesa/main/colormac.h | |
parent | 11351f0c8a88ae84ec397c7f9abb4a83c64b2cfc (diff) |
Add RGBA4444 and RGBA5551 texture formats.
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r-- | src/mesa/main/colormac.h | 4 |
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)) |