From 9d6e908f140d0ed2fe8031d0f8084aaf2c3477db Mon Sep 17 00:00:00 2001 From: Andreas Betz Date: Fri, 11 May 2012 07:29:06 -0600 Subject: [PATCH] vega: fix 565 color unpacking bug NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Brian Paul --- src/gallium/state_trackers/vega/vg_translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2