Closed Bug 1581934 Opened 5 years ago Closed 5 years ago

Lots of flickering on latest Nightly on https://www.humblebundle.com/games/builder-bundle

Categories

(Core :: Graphics: WebRender, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
firefox70 --- unaffected
firefox71 --- verified

People

(Reporter: Yoric, Assigned: aosmond)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached video flickers.mp4 (deleted) β€”

Tried on https://www.humblebundle.com/games/builder-bundle . Pretty much everything flickers. See attachment.

Reproducible with webrender but not without for me.

Component: Graphics: Layers → Graphics: WebRender
Flags: needinfo?(aosmond)
Regressed by: wr-snapperific
Blocks: wr-71
Summary: Lots of flickering on latest Nightly → Lots of flickering on latest Nightly on https://www.humblebundle.com/games/builder-bundle
Assignee: nobody → aosmond
Has Regression Range: --- → yes
Has STR: --- → yes
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Attached file Reduced test case, v1 (deleted) β€”

Reduced test case. If I toggle picture caching off, the problem goes away. Glenn, do you think this is a latent bug with picture caching, or is there something obvious in my patches that interferes with it to you?

Flags: needinfo?(aosmond) → needinfo?(gwatson)

Also worth noting is that if I remove the text-shadow from the "Humble Builder Bundle" text, the wrong background flickering goes away.

I thought this might be relevant in P2, but it appears restoring it to always invalidate the segments and GPU cache handles did nothing. It shouldn't need it anymore since the local rect is always the same now (we can probably remove the segments invalidated flag too now?).

https://searchfox.org/mozilla-central/diff/13d6122e891489808ab438c3510013e032e5df47/gfx/wr/webrender/src/prim_store/mod.rs#2158-2159

Assignee: aosmond → nobody

I suspect this might be fixed by https://phabricator.services.mozilla.com/D46247 when it lands. I'll take a closer look this morning.

Flags: needinfo?(gwatson)

That patch doesn't fix the problem. I also checked and the flickering doesn't seem to be where any of the tile boundaries are.

Hmm, I see the bug even with picture caching completely disabled here, so it seems likely that it's something in the snapping patches that mozregression pointed to.

If I bisected correctly, this is the commit that caused or exposed the issue:

a6418af845752ba659bd7a88333b9f80fea98745 is the first bad commit
commit a6418af845752ba659bd7a88333b9f80fea98745
Author: Andrew Osmond <aosmond@mozilla.com>
Date:   Sat Sep 14 16:17:02 2019 +0000

    Bug 1574493 - Part 2. Remove snapping in frame building. r=kvark
    
    This will be rewritten in a later patch in the series. The shaders will
    be provided the correct information and will no longer need to concern
    themselves with snapping.

I'll take a closer look at this commit and see if I can spot anything odd.

I'm possibly just misunderstanding that patch, but it looks like the code that propagates the local rect of pictures up to the parent surface was removed, and I don't see anything that replaces it? Perhaps it's related to that? That would definitely be affected by things like text shadows, which create a picture that dynamically calculate the bounding rect?

If that is the issue, it looks like you might be able to fix it by adding pictures to the list of deferred prim items that have their bounding rects handled later, in the same way as backdrop filter prims?

Glenn, been working through the code changes this morning, and I think I understand what you mean now in comment 10. I think you are correct, the pictures aren't included in the calculations on the first pass. Or at least not in their entirety. It used to work this way, and I thought I was just restoring the old behaviour, but maybe it was always wrong :).

Assignee: nobody → aosmond
Status: NEW → ASSIGNED

As it turns out, the difference between the snapped local rect and the
unsnapped local rect was not just that the former contained snapped
primitives and the latter contained unsnapped primitives, but also that
the former took into account surface inflation for primitives, the
entire clip chain instead of just the primitive's local clip, and
removal of culled primitives. As such, the picture's rects can be wildly
different, even if snapping has been taken care of earlier, and parts of
WebRender have come to rely upon this more accurate representation of a
picture.

Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56c82d00c513
Restore the calculation for a more precise picture local rect. r=kvark,gw
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/43dbcbd6f57a
Restore the calculation for a more precise picture local rect. r=kvark,gw
Backout by aiakab@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a1f7dcb1266
Backed out changeset 43dbcbd6f57a for causing reftest failures on 1081185-1.html.
Pushed by aosmond@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/96ce8d267d27
Restore the calculation for a more precise picture local rect. r=kvark,gw
Flags: needinfo?(aosmond)
Blocks: 1583469
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1583763

Confirmed (assuming that humblebundle.com didn't change their code): I don't see the issue on humblebundle.com anymore.

Regressions: 1589198

Hello! Reproduced the issue using Firefox 71.0a1 (20190916155843) on Windows 10x64. and the test case provided in comment 3.
The issue is verified fixed with Firefox 71.0b9 (20191111170815) on Windows 10x64, Ubuntu 18.04 and macOS 10.12. No flicker showed on the test case while using Webrender.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: