diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 23:29:50 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 23:31:02 +0200 |
commit | 70dd5e7c66b1fe3f82e5b4db2406050baba15f05 (patch) | |
tree | 3f012200ef3c934f33db1a4ef2b790fae3141860 /gfx/angle/src/libANGLE/renderer/d3d/FramebufferD3D.cpp | |
parent | 3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff) | |
parent | 8481fa25d246f1968d0a254ee3c6cdd82c60781a (diff) | |
download | UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.gz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.lz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.xz UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.zip |
Merge branch 'ANGLE-rollback'
This resolves #624
Note: Cherry-picked some fixes on top of the ANGLE version that we want to keep.
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, |