diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-12-22 19:29:56 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-01-04 21:59:56 +0100 |
commit | 50630f9016bdf0ea33ae1007c5a523cdcde3e3c9 (patch) | |
tree | cd9a19d1c36c44f49af5370e59dce2c99c62c5fa /src/mesa/main/colormac.h | |
parent | 73e8a2738743035e1347571ba630747d2ec33a2d (diff) |
mesa: preserve 10 bits of precision in the texstore general path for ARGB2101010
Use make_temp_float_image instead of _make_temp_chan_image.
The latter converts the texture to 8 bits/component, losing 2 bits.
Diffstat (limited to 'src/mesa/main/colormac.h')
-rw-r--r-- | src/mesa/main/colormac.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h index 065f9f937a2..a328dcd32af 100644 --- a/src/mesa/main/colormac.h +++ b/src/mesa/main/colormac.h @@ -198,10 +198,14 @@ do { \ ((((B) & 0xf8) >> 1) | (((G) & 0xc0) >> 6) | (((G) & 0x38) << 10) | (((R) & 0xf8) << 5) | \ ((A) ? 0x80 : 0)) -#define PACK_COLOR_2101010( A, B, G, R ) \ +#define PACK_COLOR_2101010_UB( A, B, G, R ) \ (((B) << 22) | ((G) << 12) | ((R) << 2) | \ (((A) & 0xc0) << 24)) +#define PACK_COLOR_2101010_US( A, B, G, R ) \ + ((((B) >> 6) << 20) | (((G) >> 6) << 10) | ((R) >> 6) | \ + (((A) >> 14) << 30)) + #define PACK_COLOR_4444( R, G, B, A ) \ ((((R) & 0xf0) << 8) | (((G) & 0xf0) << 4) | ((B) & 0xf0) | ((A) >> 4)) |