Improve SWGL linear filter performance when upscaling
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
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.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
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.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
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
Assignee | ||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1b5b53edd1d4
https://hg.mozilla.org/mozilla-central/rev/ff83cdd3dd3d
Comment 5•4 years ago
|
||
== 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
Description
•