From: Jason Ekstrand Date: Thu, 17 Jul 2014 05:19:49 +0000 (-0700) Subject: main/format_pack: Fix a wrong datatype in pack_ubyte_R8G8_UNORM X-Git-Tag: upstream/10.3~970 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecd3e89b32c851f21e8cf2ac78c38e0e12f28ca6;p=platform%2Fupstream%2Fmesa.git main/format_pack: Fix a wrong datatype in pack_ubyte_R8G8_UNORM Before it was only storing one of the color components due to truncation. With this patch it now properly stores all of them. Reviewed-by: Brian Paul Cc: "10.2" --- diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c index 6b28592..c97c052 100644 --- a/src/mesa/main/format_pack.c +++ b/src/mesa/main/format_pack.c @@ -888,7 +888,7 @@ pack_float_R_UNORM8(const GLfloat src[4], void *dst) static void pack_ubyte_R8G8_UNORM(const GLubyte src[4], void *dst) { - GLubyte *d = ((GLubyte *) dst); + GLushort *d = ((GLushort *) dst); *d = PACK_COLOR_88(src[GCOMP], src[RCOMP]); }