_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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user