fix component indexing bug in _mesa_texstore_al88()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Jun 2004 16:49:59 +0000 (16:49 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 16 Jun 2004 16:49:59 +0000 (16:49 +0000)
src/mesa/main/texstore.c

index 68a089b9d03aab05b53b7d2442cf08b9c19f27c9..574066ecdd36e9fa6473cbb104ee3b027fd607c3 100644 (file)
@@ -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) {