mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
_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:
parent
78a6e05439
commit
9c09259b8b
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue