_mesa_swizzle_ubyt_image: Don't use single swizzle_copy call
authorXiang, Haihao <haihao.xiang@intel.com>
Wed, 13 Feb 2008 07:57:44 +0000 (15:57 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 13 Feb 2008 08:00:25 +0000 (16:00 +0800)
if components don't match. fix #13508

src/mesa/main/texstore.c

index a8e639b..37d6f81 100644 (file)
@@ -809,6 +809,7 @@ _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 &&
+       srcComponents == dstComponents &&
        srcRowStride == srcWidth * srcComponents &&
        dimensions < 3) {
       /* 1 and 2D images only */