Commit 1844860f by Cody Northrop Committed by Commit Bot

FrameCapture: Handle glReadPixels with pack buffer

Test: Capture PUBG Mobile Bug: b/159238311 Bug: b/165824228 Change-Id: I3d76e0ccd641616ba971f15ed6ea280c4905fe18 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2503473 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c22200d8
...@@ -606,6 +606,12 @@ void CaptureReadPixels_pixels(const State &glState, ...@@ -606,6 +606,12 @@ void CaptureReadPixels_pixels(const State &glState,
void *pixels, void *pixels,
ParamCapture *paramCapture) ParamCapture *paramCapture)
{ {
if (glState.getTargetBuffer(gl::BufferBinding::PixelPack))
{
// If a pixel pack buffer is bound, this is an offset, not a pointer
paramCapture->value.voidPointerVal = pixels;
return;
}
// Use a conservative upper bound instead of an exact size to be simple. // Use a conservative upper bound instead of an exact size to be simple.
static constexpr GLsizei kMaxPixelSize = 32; static constexpr GLsizei kMaxPixelSize = 32;
paramCapture->readBufferSizeBytes = kMaxPixelSize * width * height; paramCapture->readBufferSizeBytes = kMaxPixelSize * width * height;
......
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