RenderCompositorD3D11SWGL does not use external compositing for WebGL rendering(sw-wr)
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
People
(Reporter: sotaro, Assigned: gw)
References
(Blocks 2 open bugs)
Details
When WebGL page like the following was shown, RenderCompositorD3D11SWGL did not use external compositing.
Then WebGL texture data was read back with RenderDXGITextureHost::MapPlane().
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
•
|
||
It seems that external compositing seems to need, both aPreferCompositorSurface=true and aSupportsExternalCompositing=true at DisplayListBuilder::PushImage().
But aPreferCompositorSurface=true is set only when Texture format or TextureFlags::IS_OPAQUE flag is necessary.
With WebGL, texture format is always BGRA
And TextureFlags::IS_OPAQUE flag is not set by default, since WebGLContextOptions::alpha is true by default.
Then when content does not set WebGLContextOptions::alpha=false, WebGL content texture is not opaque.
Reporter | ||
Comment 2•4 years ago
|
||
:gw, is it possible to enable external compositing at WebRender even when WebGL content texture is not opaque?
Comment 3•4 years ago
|
||
The current code for creating external compositor surfaces requires them to be opaque, so that they can be drawn underneath the transparent picture cache tiles, which will only contain content above the external surface (since everything behind will have been occluded).
Allowing transparent external surfaces will mean we could require transparent picture cache tiles both in front and behind the external surface in order to render correctly.
I think a lot of WebGL content uses helper libraries which switch the default to not having alpha, so a lot of games etc will be opaque. If you think the transparent case is common, then maybe we should prioritize fixing this.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 4•4 years ago
•
|
||
It seems necessary for Software WebRender with Compositor on Android. fps of WebGL Aquarium was not good with Software WebRender with Compositor on Android.
https://webglsamples.org/aquarium/aquarium.html
Reporter | ||
Comment 5•4 years ago
|
||
:gw, can you advice how external compositing support of non-opaque surface could be added to WebRender?
Assignee | ||
Comment 6•4 years ago
|
||
What we need to do is add z-ordering support to tiles in picture cache code for tiles within a single slice. This is conceptually easy to do, but is a bit involved due to the current picture cache dependency code assuming that tiles within a slice don't overlap at all, so needs a bit of refactoring.
I am planning to work in the next month or so on refactoring how picture caches store primitive dependencies, so I could include support for this functionality as part of that refactoring.
Jim, do we have a high priority on this, or is it fine to do as part of the prim dependency refactoring work we've discussed previously?
Comment 7•4 years ago
|
||
I guess it depends on how badly we need the perf improvements to ship sw-wr on Android. Lets chat in the triage meeting.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Description
•