Commit dadeffa3 by Jamie Madill Committed by Commit Bot

Capture/Replay: Fix stride in compressed texture caching.

We were saving "width" bytes instead of "width * pixelSize". This was causing incorrect rendering in T-Rex and Manhattan. Bug: angleproject:4488 Change-Id: Ib5d38aaf813fb26905aedc155cc13b9d1597ec4c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2109336Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent f955fb45
......@@ -2813,7 +2813,7 @@ void FrameCapture::captureCompressedTextureData(const gl::Context *context, cons
GLint y = yindex + yoffset;
GLint pixelOffset = zindex * pixelDepthPitch + yindex * pixelRowPitch;
GLint levelOffset = z * levelDepthPitch + y * levelRowPitch + xoffset * pixelBytes;
memcpy(&levelData[levelOffset], &pixelData[pixelOffset], pixelWidth);
memcpy(&levelData[levelOffset], &pixelData[pixelOffset], pixelRowPitch);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment