diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 18:11:13 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 18:11:13 +0200 |
commit | 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch) | |
tree | f000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp | |
parent | 3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff) | |
download | UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip |
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp')
-rwxr-xr-x | gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp index cc8bb0ea7..a45c94538 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp @@ -207,7 +207,7 @@ GLenum FramebufferD3D::getImplementationColorReadFormat() const GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat); - return implementationFormatInfo.getReadPixelsFormat(); + return implementationFormatInfo.format; } GLenum FramebufferD3D::getImplementationColorReadType() const @@ -229,7 +229,7 @@ GLenum FramebufferD3D::getImplementationColorReadType() const GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget); const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat); - return implementationFormatInfo.getReadPixelsType(); + return implementationFormatInfo.type; } gl::Error FramebufferD3D::readPixels(ContextImpl *context, @@ -240,13 +240,15 @@ gl::Error FramebufferD3D::readPixels(ContextImpl *context, { const gl::PixelPackState &packState = context->getGLState().getPackState(); - const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(gl::GetSizedInternalFormat(format, type)); - - GLuint outputPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeRowPitch(area.width, packState.alignment, packState.rowLength), - outputPitch); + GLenum sizedInternalFormat = gl::GetSizedInternalFormat(format, type); + const gl::InternalFormat &sizedFormatInfo = gl::GetInternalFormatInfo(sizedInternalFormat); + GLuint outputPitch = 0; + ANGLE_TRY_RESULT( + sizedFormatInfo.computeRowPitch(type, area.width, packState.alignment, packState.rowLength), + outputPitch); GLuint outputSkipBytes = 0; - ANGLE_TRY_RESULT(formatInfo.computeSkipBytes(outputPitch, 0, packState, false), + ANGLE_TRY_RESULT(sizedFormatInfo.computeSkipBytes(outputPitch, 0, 0, packState.skipRows, + packState.skipPixels, false), outputSkipBytes); return readPixelsImpl(area, format, type, outputPitch, packState, |