summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-04-02 05:10:17 +0000
committerBrian Paul <[email protected]>2004-04-02 05:10:17 +0000
commit8b0afe0a67ee348bd0d71cc52d980e570f6daa2c (patch)
tree10f76d10aec91d2f49f2c42c5c79a6ba78dee315 /src/mesa/main
parent96f17ea93811e77f35f7d23d8c89e5256c45f9ad (diff)
fix error in rgb332 texel fetch function
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texformat_tmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index cf1b3d87a44..1ec9bb33b4c 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -488,7 +488,7 @@ static void FETCH(rgb332)( const struct gl_texture_image *texImage,
const GLubyte s = *src;
texel[RCOMP] = UBYTE_TO_CHAN( ((s ) & 0xe0) * 255 / 0xe0 );
texel[GCOMP] = UBYTE_TO_CHAN( ((s << 3) & 0xe0) * 255 / 0xe0 );
- texel[BCOMP] = UBYTE_TO_CHAN( ((s << 5) & 0xc0) * 255 / 0xc0 );
+ texel[BCOMP] = UBYTE_TO_CHAN( ((s << 6) & 0xc0) * 255 / 0xc0 );
texel[ACOMP] = CHAN_MAX;
}
@@ -500,7 +500,7 @@ static void FETCH(f_rgb332)( const struct gl_texture_image *texImage,
const GLubyte s = *src;
texel[RCOMP] = ((s ) & 0xe0) * (1.0F / 224.0F);
texel[GCOMP] = ((s << 3) & 0xe0) * (1.0F / 224.0F);
- texel[BCOMP] = ((s << 5) & 0xc0) * (1.0F / 192.0F);
+ texel[BCOMP] = ((s << 6) & 0xc0) * (1.0F / 192.0F);
texel[ACOMP] = CHAN_MAXF;
}