Commit da34d002 by Geoff Lang

Apply the pixel pack state before ReadPixels in FramebufferGL.

This ensures that the PBO is bound because it does not have a dirty bit yet. BUG=angleproject:1149 BUG=angleproject:885 Change-Id: Iad96abc4dec4e6ac8187975c7638dfd7f18951e7 Reviewed-on: https://chromium-review.googlesource.com/296963Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent d0f9fdc7
...@@ -241,11 +241,10 @@ GLenum FramebufferGL::getImplementationColorReadType() const ...@@ -241,11 +241,10 @@ GLenum FramebufferGL::getImplementationColorReadType() const
gl::Error FramebufferGL::readPixels(const gl::State &state, const gl::Rectangle &area, GLenum format, GLenum type, GLvoid *pixels) const gl::Error FramebufferGL::readPixels(const gl::State &state, const gl::Rectangle &area, GLenum format, GLenum type, GLvoid *pixels) const
{ {
// TODO: don't sync the pixel pack state here once the dirty bits contain the pixel pack buffer
// binding
const gl::PixelPackState &packState = state.getPackState(); const gl::PixelPackState &packState = state.getPackState();
if (packState.pixelBuffer.get() != nullptr) mStateManager->setPixelPackState(packState);
{
UNIMPLEMENTED();
}
mStateManager->bindFramebuffer(GL_READ_FRAMEBUFFER, mFramebufferID); mStateManager->bindFramebuffer(GL_READ_FRAMEBUFFER, mFramebufferID);
mFunctions->readPixels(area.x, area.y, area.width, area.height, format, type, pixels); mFunctions->readPixels(area.x, area.y, area.width, area.height, format, type, pixels);
......
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