diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-07-16 22:19:49 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2014-07-30 16:28:54 -0700 |
commit | 8c8dc8c9e95f82051f598d2c878175e4208b351a (patch) | |
tree | 76842fdbfe46183da0222aeec69760dc13676855 /src | |
parent | 775895110ce67d9c73d991985537cb43f9ca5dc2 (diff) |
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 <brianp@vmware.com>
Cc: "10.2" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ecd3e89b32c851f21e8cf2ac78c38e0e12f28ca6)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/format_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c index e3cbfff7e12..fb247457fde 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]); } |