diff options
author | Jason Ekstrand <[email protected]> | 2014-07-16 22:19:49 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-07-18 18:34:36 -0700 |
commit | ecd3e89b32c851f21e8cf2ac78c38e0e12f28ca6 (patch) | |
tree | e5f2ba936a93cbd6f0080aadf0d1799e8bf2358b /src/mesa/main/format_pack.c | |
parent | 8ed24543f8834ef2591715ca43df538bfe5fdf06 (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 <[email protected]>
Cc: "10.2" <[email protected]>
Diffstat (limited to 'src/mesa/main/format_pack.c')
-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 6b28592a629..c97c05297ef 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]); } |