Give webrender's shader's varyings explicit precisions
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: jnicol, Assigned: jnicol)
References
Details
Attachments
(2 files)
Mali profiler shows us that we are fragment bounds, and particularly varying interpolation bound on many websites on Mali devices. Reducing varying precision to mediump
where possible will help mitigate this.
Assignee | ||
Comment 1•1 year ago
|
||
Mali profiling tools have shown we are frequently fragment bound, in
particular due to varying interpolation. To help mitigate this, we
should use mediump where possible. Currently most of our varyings are
implicitly highp by default. This patch reduces their precision to
mediump where possible. When varyings must remain highp for
correctness reasons, this is now stated explicitly.
As expected, this does cause a fair bit of reftest fuzziness on
Android devices. This patch also updates reftest expectations to
reflect this.
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
The previous patch in this series ensured that every varying is now
given an explicit precision. We want to use mediump where possible for
performance reasons, and highp when required for correctness. Going
forward, in order to ensure that developers have considered what
precision is required for new varyings, this patch adds a shader test
to ensure that they are explicitly qualified.
Shader tests have until now used the glsl
crate. And as the glsl
crate does not handle preprocessor directive properly, we ran them on
the pre-optimized shader sources. However, the optimization pass
outputs explicit varying precisions even if the input did not contain
them, so that does not work for this case. Instead, we have switched
to use theglsl-lang
crate, which does handle preprocessor directives
correctly. This does add some duplicate crate dependencies, however
this only affects wrench, not webrender itself.
Depends on D173028
Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d13c0ab66f0 Give all webrender's shader varyings an explicit precision. r=gfx-reviewers,lsalzman https://hg.mozilla.org/integration/autoland/rev/c365f3dc09e9 Add test to ensure shaders have explicit precision specifier. r=gfx-reviewers,lsalzman
Comment 4•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8d13c0ab66f0
https://hg.mozilla.org/mozilla-central/rev/c365f3dc09e9
Description
•