From 85ffbdd8d7ee03698dabb15db0c479f0d49599b7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 16 Jun 2004 16:49:59 +0000 Subject: fix component indexing bug in _mesa_texstore_al88() --- src/mesa/main/texstore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa') 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) { -- cgit v1.2.3