Closed Bug 1705024 Opened 4 years ago Closed 3 years ago

Improve eviction of cached render task

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: nical, Assigned: nical)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Cached render task tend to linger in the texture cache long after their primitive is gone. As a result, things like animated gradients can fill up the cache rather quickly.

I think that we should have a different heuristic for upload content and cached content. cached content is usually much cheaper to re-build than texture uploads, so we could and should be much more aggressive about evicting cached render tasks. This would give let us avoid allocating new cache textures more often (which has driver overhead and hurts batching), and maybe reduce the size of our cache texture to save memory.

Summary: Improve eviction of cahced render task → Improve eviction of cached render task
Depends on: 1711462

Cached render tasks are usually much cheaper to produce than texture uploads so it's good to make sure lingering unused render tasks don't create unnecessary pressure on the texture cache. It also avoids things like animated gradients from filling the texture cache in a second.

Depends on D115206

Assignee: nobody → nical.bugzilla
Status: NEW → ASSIGNED
Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40fd0d9fbaa7 Evict unused cached render tasks after 10 frames. r=gfx-reviewers,gw

Backed out for reftest failures on svg-paint-rect-changes.html along with Bug 1711462

backout: https://hg.mozilla.org/integration/autoland/rev/28c6110d23c90932553f9395cc87619abcd9493e

push: https://treeherder.mozilla.org/jobs?repo=autoland&revision=40fd0d9fbaa7b90f854fd5b7536c719efccf2965&group_state=expanded

push where first occurrences were seen: https://treeherder.mozilla.org/jobs?repo=autoland&revision=bced45f54b4681ea9fcb6417dfff168423698e37&searchStr=reftest&group_state=expanded&selectedTaskRun=WOPbiXMJQd6H8sISH7Phrg.0 which led to backfilling

failure log: https://treeherder.mozilla.org/logviewer?job_id=340028947&repo=autoland&lineNumber=11017

[task 2021-05-18T13:50:13.297Z] 13:50:13     INFO - REFTEST TEST-LOAD | file:///opt/worker/tasks/task_162134523842922/build/tests/reftest/tests/layout/reftests/invalidation/svg-paint-rect-changes-ref.html | 99 / 101 (98%)
[task 2021-05-18T13:50:13.306Z] 13:50:13     INFO - [Child 1572, Main Thread] WARNING: early callback, or time went backwards: '!aAllowIdleDispatch', file /builds/worker/checkouts/gecko/xpcom/threads/IdleTaskRunner.cpp:179
[task 2021-05-18T13:50:13.332Z] 13:50:13     INFO - [Child 1572, Main Thread] WARNING: early callback, or time went backwards: '!aAllowIdleDispatch', file /builds/worker/checkouts/gecko/xpcom/threads/IdleTaskRunner.cpp:179
[task 2021-05-18T13:50:13.349Z] 13:50:13     INFO - [Child 1572, Main Thread] WARNING: early callback, or time went backwards: '!aAllowIdleDispatch', file /builds/worker/checkouts/gecko/xpcom/threads/IdleTaskRunner.cpp:179
[task 2021-05-18T13:50:13.351Z] 13:50:13     INFO - REFTEST INFO | REFTEST fuzzy test (0, 0) <= (2, 1) <= (1, 1)
[task 2021-05-18T13:50:13.447Z] 13:50:13     INFO - REFTEST TEST-UNEXPECTED-FAIL | layout/reftests/invalidation/svg-paint-rect-changes.html == layout/reftests/invalidation/svg-paint-rect-changes-ref.html | image comparison, max difference: 2, number of differing pixels: 1
Flags: needinfo?(nical.bugzilla)

Changing the cache eviction heuristics apparently leads to cached items being positioned differently in texture atlases causing fuzzy differences to changes.

Pushed by nsilva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8517832fbb92 Evict unused cached render tasks after 10 frames. r=gfx-reviewers,gw https://hg.mozilla.org/integration/autoland/rev/e8dc6525769f Adjust reftest fuzziness. r=gfx-reviewers,kvark
Flags: needinfo?(nical.bugzilla)
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: