From: Brian Paul Date: Wed, 16 Jun 2004 16:49:59 +0000 (+0000) Subject: fix component indexing bug in _mesa_texstore_al88() X-Git-Tag: mesa-7.8~10903 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85ffbdd8d7ee03698dabb15db0c479f0d49599b7;p=platform%2Fupstream%2Fmesa.git fix component indexing bug in _mesa_texstore_al88() --- diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 68a089b..574066e 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1374,8 +1374,9 @@ _mesa_texstore_al88(STORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLushort *dstUS = (GLushort *) dstRow; for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_88( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]) ); + /* src[0] is luminance, src[1] is alpha */ + dstUS[col] = PACK_COLOR_88( CHAN_TO_UBYTE(src[1]), + CHAN_TO_UBYTE(src[0]) ); src += 2; } if (dstFormat == &_mesa_texformat_al88_rev) {