From: Andreas Betz Date: Fri, 11 May 2012 13:29:06 +0000 (-0600) Subject: vega: fix 565 color unpacking bug X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d6e908f140d0ed2fe8031d0f8084aaf2c3477db;p=mesa.git vega: fix 565 color unpacking bug NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Brian Paul --- diff --git a/src/gallium/state_trackers/vega/vg_translate.c b/src/gallium/state_trackers/vega/vg_translate.c index 06cc003b0b9..7b3df277c3b 100644 --- a/src/gallium/state_trackers/vega/vg_translate.c +++ b/src/gallium/state_trackers/vega/vg_translate.c @@ -526,8 +526,8 @@ void _vega_unpack_float_span_rgba(struct vg_context *ctx, src += offset; for (i = 0; i < n; ++i) { VGfloat clr[4]; - clr[0] = ((*src >> 10) & 31)/31.; - clr[1] = ((*src >> 5) & 95)/95.; + clr[0] = ((*src >> 11) & 31)/31.; + clr[1] = ((*src >> 5) & 63)/63.; clr[2] = ((*src >> 0) & 31)/31.; clr[3] = 1.f;