Closed Bug 2057452 Opened 1 month ago Closed 1 month ago

Intermittent tile-shaped glitches with Webrender on Metal ANGLE

Categories

(Core :: Graphics, defect)

defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxpe])

Attachments

(1 file)

Markus has seen this. I think I have once or twice myself.

I think we're missing some synchronisation between rendering the picture cache tiles and compositing them. We call glFlush() here but presumably that is not enough on Metal ANGLE.

I'm going to try waiting on a EGL_SYNC_METAL_COMMANDS_SCHEDULED_ANGLE sync instead.

RenderCompositorNative calls glFlush() prior to compositing its
layers. This is enough synchronisation on native GL on macOS, but on
Metal ANGLE we have observed intermittent tile shaped glitches.

It's hard to reproduce reliably, but as a speculative fix try waiting
for the prior commands to be scheduled using the
ANGLE_wait_until_work_scheduled extension.

See Also: → 2057987
Pushed by jnicol@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9bfbbd8a493e https://hg.mozilla.org/integration/autoland/rev/157111f7fc91 Wait for commands to be scheduled before compositing on Metal ANGLE. r=gfx-reviewers,bradwerth
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

I discovered this bug could be reproduced trivially on this page: https://registry.khronos.org/webgl/sdk/tests/extra/workload-simulator.html?animate&glWork&drawCalls=10000&x100

with animation enabled and a massive draw call count. then pressing cmd+L to activate the URL bar dropdown. 4 out of 5 times I see the glitches on my M5 Macbook pro.

And with the patch I can no longer reproduce. There could of course be other scenarios in which it reproduces, so will keep an eye out. But that's a good sign.

I also haven't seen these glitches anymore since this fix landed. Looks good to me!

QA Whiteboard: [qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: