diff options
author | Brian Paul <[email protected]> | 2011-11-30 20:35:02 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-02 07:22:39 -0700 |
commit | 0be753a14333b1298649da1d889fe1fc7d3e9f43 (patch) | |
tree | 1ffa2109960add71af6327f258fb4297e4aa4b7e /src/mesa/main/format_unpack.c | |
parent | e304aa3600f865db533d273e2c1a554cb6a54f05 (diff) |
mesa: fix unpacking of RG88_REV texels
R should be in the high byte and G in the low byte for this format.
Diffstat (limited to 'src/mesa/main/format_unpack.c')
-rw-r--r-- | src/mesa/main/format_unpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 7da95465b4e..079f71b13ee 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -522,8 +522,8 @@ unpack_RG88_REV(const void *src, GLfloat dst[][4], GLuint n) const GLushort *s = ((const GLushort *) src); GLuint i; for (i = 0; i < n; i++) { - dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff ); - dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 ); + dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 ); + dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff ); dst[i][BCOMP] = 0.0; dst[i][ACOMP] = 1.0; } |