Optimize WR sample_gradient
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: lsalzman, Assigned: lsalzman)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
There are a few micro-optimizations we can do for WR's sample_gradient that should make it friendlier with SWGL. Integer clamps are much more expensive than FP clamps in SSE2. We can also help the GLSL translator out a bit better with some of the floor/fract common-expressions in case it's not doing a good job.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Gradient shaders end up calling fetch_from_gpu_cache_2 with a vectorized
address. This currently disables SWGL texelFetchPtr optimization for repeated
uses of texelFetchOffsets. In principle this optimization can still work in
vector mode. We just need to use an I32 instead of a direct pointer into the
buffer in this case. I've added a texelFetchUnchecked wrapper to automagically
disambiguate between scalar and vector cases.
Comment 4•4 years ago
|
||
Backed out 2 changesets (Bug 1664735) for causing failures in repeating-conic-gradient.html CLOSED TREE
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=315724947&repo=autoland&lineNumber=5283
Backout: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=315724947&repo=autoland&lineNumber=5283
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/acc2af307fe8
https://hg.mozilla.org/mozilla-central/rev/ea8cc0187a75
Assignee | ||
Updated•4 years ago
|
Description
•