From: Brian Paul Date: Wed, 16 Jun 2004 16:49:59 +0000 (+0000) Subject: fix component indexing bug in _mesa_texstore_al88() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=85ffbdd8d7ee03698dabb15db0c479f0d49599b7;p=mesa.git fix component indexing bug in _mesa_texstore_al88() --- diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 68a089b9d03..574066ecdd3 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) {