One-frame magenta flash during view transitions on Asahi (snapshot sampled before it is rendered)
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: ghwns6743, Assigned: ghwns6743)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
Steps to reproduce:
Fedora Asahi Remix 44 (Mesa 26.1.7), Apple M1 Pro, Wayland. Reproduces on
Firefox 154 (Fedora package) and a local build of main at 1ac9c360f82e.
- Open a youtube.com watch page.
- Repeatedly click video thumbnails in sidebar.
Actual results:
The transition often starts with one frame where most or all of the viewport is magenta.
The ::view-transition-new image samples its snapshot's texture cache
entry before the snapshot has been rendered into it.
image_dependencies in frame_builder.rs is meant to order the two, but nothing reads it on current main, so the snapshot task ends up in the last pass while the
image, nested in the cross-fade's opacity/mix-blend surfaces, reads the
entry a few passes earlier.
on the frame the entry is allocated, it is uninitialized, which on AGX
reads back as magenta. Another driver may show something else there; the missing dependency is not driver-specific.
reftests/image/snapshot-dependency.yaml is meant to cover this, but it
has "filter:" where wrench expects "filters:", so the nested surfaces
are never built and the test never hits the case it was written for.
with the key fixed it fails on unpatched main.
Patch attached: read image_dependencies in prepare_image_quads and make the image's surface depend on the snapshot task, plus the "filters:" fix in the test and its reference.
Across three 90-second runs each way, I recorded 23 magenta frames without the patch and 0 with it; the wrench image reftests pass (27/27, swgl).
if that sounds reasonable, I'll put it on Phabricator once this has a number.
Expected results:
A cross-fade.
Nothing reads image_dependencies, so a snapshot's render task has no
dependents and is scheduled in the last pass, after the image that
displays it from inside an intermediate surface has already sampled the
texture cache entry. On the frame the entry is allocated it is
uninitialized.
Make the surface that displays a snapshot depend on its task, unless the
snapshot's own surface is still on the builder stack, where that would be
a cycle.
Updated•1 month ago
|
The test used the singular filter: key, which wrench ignores, so the image
it displays was never nested in filter surfaces and the test passed even
without the dependency.
Comment 3•1 month ago
|
||
The severity field is not set for this bug.
:gw, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 month ago
|
Comment 4•1 month ago
|
||
There are some r+ patches which didn't land and no activity in this bug for 1 week.
:ghwns6743, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Updated•1 month ago
|
Comment 6•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/83fefb5510fd
https://hg.mozilla.org/mozilla-central/rev/7fa7b556f151
Updated•23 days ago
|
Description
•