summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texfetch_tmp.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-30 20:35:02 -0700
committerBrian Paul <[email protected]>2011-12-02 07:22:39 -0700
commit0be753a14333b1298649da1d889fe1fc7d3e9f43 (patch)
tree1ffa2109960add71af6327f258fb4297e4aa4b7e /src/mesa/swrast/s_texfetch_tmp.h
parente304aa3600f865db533d273e2c1a554cb6a54f05 (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/swrast/s_texfetch_tmp.h')
-rw-r--r--src/mesa/swrast/s_texfetch_tmp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_texfetch_tmp.h b/src/mesa/swrast/s_texfetch_tmp.h
index 4ee05a5ea5a..88711b03e4e 100644
--- a/src/mesa/swrast/s_texfetch_tmp.h
+++ b/src/mesa/swrast/s_texfetch_tmp.h
@@ -1040,8 +1040,8 @@ static void FETCH(f_rg88_rev)( const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
{
const GLushort s = *TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
- texel[RCOMP] = UBYTE_TO_FLOAT( s & 0xff );
- texel[GCOMP] = UBYTE_TO_FLOAT( s >> 8 );
+ texel[RCOMP] = UBYTE_TO_FLOAT( s >> 8 );
+ texel[GCOMP] = UBYTE_TO_FLOAT( s & 0xff );
texel[BCOMP] = 0.0;
texel[ACOMP] = 1.0;
}
@@ -1052,7 +1052,7 @@ static void store_texel_rg88_rev(struct swrast_texture_image *texImage,
{
const GLubyte *rgba = (const GLubyte *) texel;
GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
- *dst = PACK_COLOR_88(rgba[GCOMP], rgba[RCOMP]);
+ *dst = PACK_COLOR_88(rgba[RCOMP], rgba[GCOMP]);
}
#endif