Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Cherry-pick ANGLE: D3D11: Skip blits if there is no intersection of d…
…est areas https://bugs.webkit.org/show_bug.cgi?id=225190 <rdar://77084155> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-05-27 Reviewed by David Kilzer. Cherry-pick ANGLE commit b574643ef28c92fcea5122dd7a72acb42a514eed Fixes a security issue on D3D11. Potential a correctness issue on some OpenGL drivers. No effect on Metal, but the nodiscard part is still useful. Upstream description: D3D11: Skip blits if there is no intersection of dest areas Blit11 would clip the destination rectangle with the destination size but ignore the result. gl::ClipRectangle returns false when the rectangles do not intersect at all, indicating the blit can be skipped. This could lead to an out-of-bounds write to the GPU memory for the destination texture. Mark ClipRectangle as nodiscard to prevent future issues. * src/libANGLE/angletypes.h: * src/libANGLE/renderer/d3d/d3d11/Blit11.cpp: * src/libANGLE/renderer/gl/FramebufferGL.cpp: (rx::FramebufferGL::clipSrcRegion): * src/libANGLE/renderer/metal/ContextMtl.mm: (rx::ContextMtl::updateScissor): * src/libANGLE/renderer/vulkan/ContextVk.cpp: (rx::ContextVk::updateScissor): * src/tests/gl_tests/BlitFramebufferANGLETest.cpp: (TEST_P): Canonical link: https://commits.webkit.org/238196@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
79 additions
and 6 deletions.
- +35 −0 Source/ThirdParty/ANGLE/ChangeLog
- +3 −1 Source/ThirdParty/ANGLE/src/libANGLE/angletypes.h
- +4 −1 Source/ThirdParty/ANGLE/src/libANGLE/renderer/d3d/d3d11/Blit11.cpp
- +4 −1 Source/ThirdParty/ANGLE/src/libANGLE/renderer/gl/FramebufferGL.cpp
- +4 −1 Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm
- +5 −2 Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ContextVk.cpp
- +24 −0 Source/ThirdParty/ANGLE/src/tests/gl_tests/BlitFramebufferANGLETest.cpp
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters