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
[WPE][WebGL][Canvas][Compositing] Fix partially rendered WebGL canvas… #8520
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash 87184bd)
|
Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
Outdated
Show resolved
Hide resolved
I've added a comment in Bugzilla https://bugs.webkit.org/show_bug.cgi?id=250314#c5 about all possible solutions available to fix this issue. All possible solutions I can foresee for now have their advantages and drawbacks, none is perfect. It depends on the concrete use case. This current implementation follows the solution 1a. It guaranties frame completeness in all conditions, but at the price of lower performances as it blocks the rendering thread (which may also be the webview main thread) until all WebGL commands have been executed for the corresponding canvas in the view. We should discuss about which solution would be the best "all purposes" solution, knowing that if only glFinish is available (no fences), only current solution (1a) can be implemented. |
… composition https://bugs.webkit.org/show_bug.cgi?id=250314 Reviewed by NOBODY (OOPS!). When rendering heavy 3D scenes in a WebGL canvas using the WPE EGL renderer, the compositor may use the element render target texture BEFORE all the WebGL commands are correctly executed by the GPU. Then, on most complex frames, the canvas appears totally blank or partially rendered. This patch ensures that all GL commands from the WebGL canvas context are finished before using the render target texture in the compositor. * Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp: (WebCore::GraphicsContextGLGBM::prepareTexture):
EWS run on current version of this PR (hash 9d7fc9b)
|
[WPE][WebGL][Canvas][Compositing] Fix partially rendered WebGL canvas composition
https://bugs.webkit.org/show_bug.cgi?id=250314
Reviewed by NOBODY (OOPS!).
When rendering heavy 3D scenes in a WebGL canvas using the WPE EGL
renderer, the compositor may use the element render target texture
BEFORE all the WebGL commands are correctly executed by the GPU.
Then, on most complex frames, the canvas appears totally blank or
partially rendered. This patch ensures that all GL commands from
the WebGL canvas context are finished before using the render target
texture in the compositor.
(WebCore::GraphicsContextGLGBM::prepareTexture):
Pull Request Template
File a Bug
All changes should be associated with a bug. The WebKit project is currently using Bugzilla as our bug tracker. Note that multiple changes may be associated with a single bug.
Provided Tooling
The WebKit Project strongly recommends contributors use
Tools/Scripts/git-webkit
to generate pull requests. See Setup and Contributing Code for how to do this.Template
If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.
Additionally, the pull request should be mentioned on Bugzilla, labels applied to the pull request matching the component and version of the Bugzilla associated with the pull request and the pull request assigned to its author.
9d7fc9b