Simplify and optimize how prims are pushed to command buffers
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox113 | --- | fixed |
People
(Reporter: gw, Assigned: gw)
References
Details
(Keywords: perf-alert)
Attachments
(1 file)
| Assignee | ||
Comment 1•3 years ago
|
||
Previously, we would do a fine-grained visibility check for
prims against the dirty rect stack (after coarse grained
tile visibility), then prepare the primitive, then determine
which command buffer(s) the prim should be added to, based
on which tile(s) the prim affects.
The patch changes this so that the fine-grained visibility
check returns a list of command buffer(s) that the prim
should be added to. This is passed to the prim prepare
step, and then used to directly add prims to the buffers
rather than checking which tiles are affected by the prim.
The motivation for doing this will become apparent in
follow up patches. We want to be able to encode
multiple command buffer commands per-prim, whereas it
was previously only possible to encode primitive
commands. By allowing prim-prepare to write directly
to the command buffers, rather than return a list of
primitive commands, we can write whatever commands
are needed. Future patches will use this to write
segment rect streams, and other information.
A side effect of this is that the tile_rect field
in the PrimitiveVisibility struct is no longer
required. This reduces the size of PrimitiveInstance
from 104 bytes to 88 bytes, which is likely to be
a reasonable performance win on pages that have
high primitive counts.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
| bugherder | ||
Comment 4•3 years ago
|
||
Backed out for the various regressions linked to this bug. Please make sure we land tests for the various things that broke before this re-lands.
https://hg.mozilla.org/mozilla-central/rev/0c2282fe55b24b7a2020ac034f99b2e5583719f1
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 5•3 years ago
|
||
I have updated the patch with a fix for this + a wrench test for the code path that was broken.
I have verified locally that this fixes bug #1822548 however I was not able to reproduce on bug #1822567 locally.
I've pushed a try run to https://treeherder.mozilla.org/jobs?repo=try&revision=112e733aa10c920ef020e13fd2391be4cff34897 - perhaps someone who was able to reproduce bug #1822567 previously could verify that it's also fixed by a build from the try run artifacts before I try to re-land (I expect it to be the same underlying issue for both bugs)?
Comment 6•3 years ago
|
||
Tested locally and confirmed that the patch fixes the Google docs cursor issue as well.
Comment 8•3 years ago
|
||
| bugherder | ||
Comment 9•3 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #4)
Backed out for the various regressions linked to this bug. Please make sure we land tests for the various things that broke before this re-lands.
https://hg.mozilla.org/mozilla-central/rev/0c2282fe55b24b7a2020ac034f99b2e5583719f1
== Change summary for alert #37696 (as of Fri, 17 Mar 2023 13:59:43 GMT) ==
Regressions:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 5% | instagram LastVisualChange | windows10-64-shippable-qr | fission warm webrender | 602.75 -> 630.92 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=37696
Updated•3 years ago
|
| Assignee | ||
Comment 10•3 years ago
|
||
Looking at the graph in [1] it seems like this change is within the noise level for that test, if I'm reading it correctly?
Comment 11•3 years ago
|
||
== Change summary for alert #37723 (as of Wed, 22 Mar 2023 17:26:40 GMT) ==
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) |
|---|---|---|---|---|
| 4% | displaylist_mutate | windows10-64-shippable-qr | e10s fission stylo webrender | 2,487.08 -> 2,389.82 |
| 4% | displaylist_mutate | windows10-64-shippable-qr | e10s fission stylo webrender | 2,489.13 -> 2,396.38 |
For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=37723
Description
•