Picture cache tiles are rendered behind full-screen video
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: nical, Assigned: nical)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
When OS composition is unavailable or disabled, watching a full-screen youtube video I see draw calls emitted for each picture cache tile behind the full-screen video.
They don't pass the depth test but they add up to a non-negligible amount of useless draw calls (40 on a 4k screen) as well as some wasted gpu work.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
I traced it down to this condition: https://searchfox.org/mozilla-central/rev/fa48ebee58d59fa846919c3e2c3122b08db57c9c/gfx/wr/webrender/src/picture.rs#4712
On youtube there is a screenful of tiles behind the video that have non-root spatial node index, adding up to 20 extra draw calls and lots of overdraw.
The condition was introduced in https://phabricator.services.mozilla.com/D69760. From a glance at the bug this patch was solving it looks like we could still have a separate tag to mark non-fixed position tiles as occluded for the purpose of compositing, even if we keep requesting/rendering them when they invalidate.
On the side I have been looking into another simple occlusion culling algorithm which is fully precise for axis-aligned rect (doesn't need a z-buffer) and I think would be a good fit for the compositing pass.
Comment 2•4 years ago
|
||
Yes, I only vaguely recall the details of that patch - but from the description it does sounds like we could separate that logic a bit, and then be able to occlude non-fixed tiles again.
Switching to another occlusion culling algorithm sounds good to me - but if we can let's wait until the non-opaque compositor surface work lands. It doesn't change the occlusion culling logic itself, but it does change a lot of code around there (in particular the z_id and ordering of compositor and content surfaces). I'm hoping to have patches for this up and reviewed by the end of the week, ready to land as soon as the upcoming soft freeze is complete.
Assignee | ||
Comment 3•4 years ago
|
||
This patch introduces a simple culling algorithm that splits compositor tiles into only their visible parts, removing the need for a depth buffer. This reduces the draw-call count as well well as the memory usage and bandwidth associated with the depth buffer.
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
It used to be more convenient to store them in separate arrays but with the new occlusion culling code we don't benefit from it and have to undo it to traverse tiles from front to back.
This is a cleanup patch that should not change the behavior of the code.
Depends on D113532
Comment 6•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3e741504af67
https://hg.mozilla.org/mozilla-central/rev/de6dfc676a68
Description
•