_mesa_swizzle_ubyte_image: Only use single swizzle_copy call when strides match.

This fixes texture data corruption with glTexSubimage (and probably glTexImage
under some circumstances) with the texstore swizzle path.
This commit is contained in:
Michel Dänzer 2006-12-14 10:01:43 +01:00
parent 78a6e05439
commit 9c09259b8b

View file

@ -808,7 +808,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 == srcWidth * srcComponents &&
if (srcRowStride == dstRowStride &&
srcRowStride == srcWidth * srcComponents &&
dimensions < 3) {
/* 1 and 2D images only */
GLubyte *dstImage = (GLubyte *) dstAddr