Commit 37d9a2f4 by Gert Wollny Committed by Commit Bot

capture/replay: implement CaptureGetTexImageANGLE_pixels

Bug: angleproject:5646 Change-Id: Ia4ae0fc76eae4f9c8c133b0501eb792e794c4cfc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2718172 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c234a36a
...@@ -3402,7 +3402,22 @@ void CaptureGetTexImageANGLE_pixels(const State &glState, ...@@ -3402,7 +3402,22 @@ void CaptureGetTexImageANGLE_pixels(const State &glState,
void *pixels, void *pixels,
angle::ParamCapture *paramCapture) angle::ParamCapture *paramCapture)
{ {
UNIMPLEMENTED(); 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;
}
const Texture *texture = glState.getTargetTexture(TextureTargetToType(target));
ASSERT(texture);
// Use a conservative upper bound instead of an exact size to be simple.
static constexpr GLsizei kMaxPixelSize = 32;
size_t width = texture->getWidth(target, level);
size_t height = texture->getHeight(target, level);
size_t depth = texture->getDepth(target, level);
paramCapture->readBufferSizeBytes = kMaxPixelSize * width * height * depth;
} }
void CaptureGetRenderbufferImageANGLE_pixels(const State &glState, void CaptureGetRenderbufferImageANGLE_pixels(const State &glState,
......
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