Mesa (7.9): util: fix util_pack_color for B4G4R4A4

Marek Olšák mareko at kemper.freedesktop.org
Sat Sep 25 00:14:15 UTC 2010


Module: Mesa
Branch: 7.9
Commit: 361084ac4b16c6af59671b776b832034990766f0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=361084ac4b16c6af59671b776b832034990766f0

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Sep 23 22:54:08 2010 +0200

util: fix util_pack_color for B4G4R4A4

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 861949579049f70c2ec039fe67d772ed435f55ba)

---

 src/gallium/auxiliary/util/u_pack_color.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index aae8b8b..c90b0fd 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -394,7 +394,7 @@ util_pack_color(const float rgba[4], enum pipe_format format, union util_color *
       return;
    case PIPE_FORMAT_B4G4R4A4_UNORM:
       {
-         uc->ub = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
+         uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4);
       }
       return;
    case PIPE_FORMAT_A8_UNORM:




More information about the mesa-commit mailing list