Closed Bug 1691139 Opened 3 years ago Closed 3 years ago

Use cheaper approximations for WR shader anti-aliasing

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 2 open bugs)

Details

(Keywords: perf-alert)

Attachments

(3 files)

The signed-distance and coverage area approximations we use for shader anti-aliasing in WR are expensive due to usage of branching and normalization. There are cheaper approximations we can use that give perceptibly similar results so long as we're willing to take the hit in reftest fuzz.

The result of compute_aa_range depends on fwidth(local_pos). In the no-perspective case,
the derivatives of local_pos are constant across an entire primitive. SWGL fast-paths only
run in the no-perspective case anyway, so it is convenient to compute the aa_range once
for the entire span and then reuse it, factoring out this per-pixel cost.

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d1fc04130de
Use cheaper linear approximation for WR shader anti-aliasing. r=gw
https://hg.mozilla.org/integration/autoland/rev/0f12cc02b12e
Update wrench png refs for revised WR shader anti-aliasing. r=gw
https://hg.mozilla.org/integration/autoland/rev/f4f3f317a7d6
Optimize init_transform_fs for SWGL fast-paths where there is no perspective. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch

== Change summary for alert #28694 (as of Tue, 09 Feb 2021 12:56:20 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
3% tart linux64-shippable-qr e10s stylo webrender-sw 3.47 -> 3.37

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28694

== Change summary for alert #28736 (as of Thu, 11 Feb 2021 07:55:31 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
6% raptor-tp6-sheets-firefox-cold fcp windows10-64-shippable-qr nocondprof webrender 693.17 -> 650.75
5% raptor-tp6-sheets-firefox-cold fcp windows10-64-shippable-qr nocondprof webrender 684.58 -> 647.50

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=28736

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: