Closed Bug 1692731 (sw-wr-perf-linear) Opened 3 years ago Closed 3 years ago

Improve SWGL linear filter performance when upscaling

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Now that we've moved some inner loops for texture sampling inside SWGL itself as a result of bug 1678119, there are a few things we can do to make texture filtering faster in general.

Severity: -- → N/A
Priority: -- → P3

Often images are upscaled from a smaller resolution on a page, especially
when there is any amount of zoom being used, and especially at higher screen
resolutions. In this case, we don't really take advantage of the fact that all
the samples for a SIMD chunk can be loaded from memory in a single load, so
long as we're willing to shuffle them around. We also can take advantage of the
fact that most images are axis-aligned so that they have a constant filter
offset with the next row.

Also, we can easily fall off the fast past for blendTextureNearest if for some
reason there is a significant subpixel offset. In this case, we can still do
something way faster than a normal linear filter the optimizes for the fact
that both the X and Y steps are constant 1:1, but we need to interpolate with
neighboring samples.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

For YUV 422 video, when we are sampling UV planes at half the resolution of the
Y plane, we can interpolate from 2 samples for the UV planes as an approximation
of the 4 samples, allowing us to better pack the math into SIMD vectors and
substantially reduce the number of multiplications.

Depends on D105131

Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1b5b53edd1d4
Accelerate linear filter upscaling in SWGL. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/ff83cdd3dd3d
Accelerate YUV 422 compositing in SWGL. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch

== Change summary for alert #28833 (as of Thu, 18 Feb 2021 02:25:54 GMT) ==

Improvements:

Ratio Suite Test Platform Options Absolute values (old vs new)
4% basic_compositor_video linux64-qr e10s stylo webrender-sw 2.81 -> 2.69

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

Regressions: 1693924
Blocks: 1678779
Blocks: 1676253
Blocks: 1675621
Regressions: 1695782
Regressions: 1706441
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: