summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-04-29 21:30:04 +0100
committerKeith Whitwell <[email protected]>2008-04-29 21:30:04 +0100
commitbbafa8aa2fc8009fb8e32f996d4972c56e6b46e6 (patch)
tree079a652c4cd082b3807164a6f9a8ff615e899bee /src/gallium/auxiliary/util
parentfbddc8097ce3a9d38a061105542875dbb9f909f7 (diff)
gallium: fix pack for A1R5B5G5
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_pack_color.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index f641329d188..bb2c34e5f6e 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -92,7 +92,7 @@ util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
case PIPE_FORMAT_A1R5G5B5_UNORM:
{
ushort *d = (ushort *) dest;
- *d = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 3) | (b >> 3);
+ *d = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
}
return;
case PIPE_FORMAT_A4R4G4B4_UNORM:
@@ -171,7 +171,7 @@ util_pack_color(const float rgba[4], enum pipe_format format, void *dest)
case PIPE_FORMAT_A1R5G5B5_UNORM:
{
ushort *d = (ushort *) dest;
- *d = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 3) | (b >> 3);
+ *d = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3);
}
return;
case PIPE_FORMAT_A4R4G4B4_UNORM: