[webkit-changes] [WebKit/WebKit] 954db6: [ANGLE] Check only important stencil bits in parti...
Dan Glastonbury
noreply at github.com
Fri Jul 19 01:47:29 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 954db6704b4bba731929b99db0fe5a209a802ba9
https://github.com/WebKit/WebKit/commit/954db6704b4bba731929b99db0fe5a209a802ba9
Author: Dan Glastonbury <djg at apple.com>
Date: 2024-07-19 (Fri, 19 Jul 2024)
Changed paths:
M Source/ThirdParty/ANGLE/src/libANGLE/Framebuffer.cpp
Log Message:
-----------
[ANGLE] Check only important stencil bits in partialClearNeedsInit
https://bugs.webkit.org/show_bug.cgi?id=276805
rdar://131339205
Reviewed by Mike Wyrzykowski.
We have an RAII helper that queries the current values of stencil masks before
temporarily modifying them. Due to the GL spec specifying these state variables
being non-negative integers, ANGLE is "clamping" the values when reported via
glIntegerv. This makes code that queries and sets stencil masks non-idempotent
when masks have the MSB set.
The code in Framebuffer::partialClearNeedsInit is checking all bits for
equality, which means a check of 0xFFFFFFFF vs 0x7FFFFFFF because the query and
restore of GL_STENCIL_WRITEMASK dropped the MSB bit, leading to a slow clear of
stencil buffer.
To fix the issue, when determining if a partial clear is taking place, instead
of checking all bits of the stencil masks, only check the lowest bits
corresponding to the bit depth of the active drawing stencil attachment. This
results in combinations of masks, such as 0xFFFFFFFF and 0x7FFFFFFF as 0xFF and
0xFF, which are equal and not different.
* Source/ThirdParty/ANGLE/src/libANGLE/Framebuffer.cpp:
(gl::Framebuffer::partialClearNeedsInit):
Canonical link: https://commits.webkit.org/281130@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list