OSDN Git Service

mesa: Fix bug in _mesa_swizzle_ubyte_image
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 18 Jun 2008 17:43:06 +0000 (19:43 +0200)
committerJakob Bornecrantz <jakob@tungstengraphics.com>
Wed, 18 Jun 2008 17:43:06 +0000 (19:43 +0200)
src/mesa/main/texstore.c

index d7bfb69..519a73b 100644 (file)
@@ -823,7 +823,8 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx,
 
 /*    _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]);  */
 
-   if (srcRowStride == dstRowStride &&
+   if (srcComponents == dstComponents &&
+       srcRowStride == dstRowStride &&
        srcRowStride == srcWidth * srcComponents &&
        dimensions < 3) {
       /* 1 and 2D images only */