-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GTK][WPE] Don't allow depth test and stencil clipping if packed depth stencil is not supported #27682
Conversation
EWS run on previous version of this PR (hash 93c2dd9) |
93c2dd9
to
7cbe359
Compare
EWS run on previous version of this PR (hash 7cbe359) |
namespace WebCore { | ||
|
||
GLenum depthBufferFormat() | ||
{ | ||
static std::once_flag onceFlag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextureMapper is thread agnostic. Clients have to call all TextureMapper API from a single thread.
I think TextureMapper doesn't need thread synchronization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know that TextureMapper is only used from the compositor thread. But I'm using std::call_once to ensure that the initialization of the depth buffer format happens only once. I could use a boolean flag to check whether the value is initialized or not, but std::call_once seems to be commonly used for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's worth calling this only once, since both the extension and the version are cached.
Do you know which layout test case covers this change? |
I'm trying to create a test for it, but it's tricky. |
Creating a simple testcase to reproduce this is being complicated and I can't be stuck with this. The problem is reproducible in the page https://stv.vtmgo.be/vtmgo/prerelease/eos/index.html#/main/storefront?type=main . The size of the rendering area (not the window, as the window decorations reduce the size of the area) must be 1280x720 for it to happen, otherwise a scaling will be applied and then it won't reproduce. There's a trailer button on the middle right part of the screen with a spinner animation. That's the one causing the problem. The main element of the page has position:fixed, which forces the creation of a stacking context and the rendering of almost all the page happens to a BitmapTexture with a depth buffer. Then the spinner image tries to do an stencil clip, adding the stencil buffer to the BitmapTexture, and this breaks the rendering of the page (at least when using mesa). |
7cbe359
to
a1b1510
Compare
EWS run on current version of this PR (hash a1b1510) |
β¦h stencil is not supported https://bugs.webkit.org/show_bug.cgi?id=273177 Reviewed by Carlos Garcia Campos. Use a packed depth stencil format when available, which allows depth testing and stencil clipping at the same time. If packed depth stencil is not supported, use separate buffers for depth and stencil. In the latter case, if both buffers are requested at the same time, the stencil buffer won't be created. * Source/WebCore/platform/graphics/egl/GLContext.cpp: (WebCore::GLContext::glExtensions const): * Source/WebCore/platform/graphics/egl/GLContext.h: * Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp: (WebCore::depthBufferFormat): (WebCore::BitmapTexture::initializeStencil): (WebCore::BitmapTexture::initializeDepthBuffer): (WebCore::BitmapTexture::~BitmapTexture): * Source/WebCore/platform/graphics/texmap/BitmapTexture.h: Canonical link: https://commits.webkit.org/278159@main
a1b1510
to
ed28635
Compare
Committed 278159@main (ed28635): https://commits.webkit.org/278159@main Reviewed commits have been landed. Closing PR #27682 and removing active labels. |
Backported into the 2.44 branch as commit bd536df |
ed28635
a1b1510
π§ͺ mac-wk2-stress