Closed Bug 1682194 (sw-wr-perf-clip-rect) Opened 4 years ago Closed 4 years ago

cs_clip_rectangle shader is still slow in SW-WR

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox87 --- fixed
firefox88 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug, Regressed 2 open bugs)

Details

(Keywords: perf-alert)

Attachments

(1 file)

cs_clip_rectangle still shows up prominently in many profiles under SW-WR

Severity: -- → S4
Blocks: 1678798
Blocks: 1676554
Blocks: 1675621
Blocks: 1675057
Blocks: 1674475
Blocks: 1623887
Alias: sw-wr-perf-clip-rect
Blocks: 1685943
Blocks: 1662034
No longer blocks: 1685943
Blocks: 1674474
Depends on: 1690636
Blocks: 1673907

cs_clip_rectangle is slow because we evaluate distance AA for every fragment
the shader touches. With SWGL, we can do much better since we have control
over span. We calculate an inner opaque octagon which can just use a cheap
solid fill and an outer AA octagon within which we need to actually we do
AA and outside which we can just do another solid clear. This reduces most
of the cost of rounded-rectangles to just some setup work, a few fragments
of distance AA on the ends of a span, and large runs of solid color where
we don't have to do much work.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Attachment #9205774 - Attachment description: Bug 1682194 - Accelerate cs_clip_rectangle in SWGl. r?jrmuizel → Bug 1682194 - Accelerate cs_clip_rectangle in SWGL. r?jrmuizel
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c6e26b7c280 Accelerate cs_clip_rectangle in SWGL. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Comment on attachment 9205774 [details]
Bug 1682194 - Accelerate cs_clip_rectangle in SWGL. r?jrmuizel

Beta/Release Uplift Approval Request

  • User impact if declined: This resolves a major performance regression we identified with border-radius and box-shadows in Software Webrender and should affect a substantial portion of web pages.

Trying to do partial SW-WR rollout on Linux. Would like to avoid people reporting significant performance regressions months down the line.

  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Only impacts SW-WR/Linux. We can abort the rollout if unstable. Adequate time to deal with any bugs.
  • String changes made/needed:
Attachment #9205774 - Flags: approval-mozilla-beta?
Blocks: 1690636
No longer depends on: 1690636

Comment on attachment 9205774 [details]
Bug 1682194 - Accelerate cs_clip_rectangle in SWGL. r?jrmuizel

Approved for 87.0b4.

Attachment #9205774 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

== Change summary for alert #28966 (as of Mon, 01 Mar 2021 14:14:09 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
11% tart linux64-shippable-qr e10s stylo webrender-sw 3.05 -> 2.73

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

Regressions: 1696439
Regressions: 1712452
See Also: → 1791495
Regressions: 1814628
Regressions: 1842544
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: