Generate shaders at build time
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Tracking
()
People
(Reporter: jrmuizel, Unassigned)
References
(Blocks 2 open bugs)
Details
We would like to have this for a number of reasons:
- sw-wr wants to translate to c++ at build time
- mac may want to do glsl optimizations at build time
- it would be nice to compile to d3d byte code at build time
- gfx-rs wants spirv so needs to do glsl-to-spirv at build time
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Apparently https://github.com/szeged/webrender has some kind of implementation of this. Dzmitry, can you point it out?
Comment 2•5 years ago
|
||
Yep, Szeged team generates SPIR-V modules from our GLSL shaders at build time: https://github.com/szeged/webrender/blob/master/webrender/build_gfx.rs
Updated•5 years ago
|
Reporter | ||
Comment 3•4 years ago
|
||
This is done.
Comment 4•4 years ago
|
||
I'm still seeing that Fenix is ~10% slower on the first pageload with WebRender enabled vs WebRender disabled.
https://docs.google.com/spreadsheets/d/18qCiz3SReDgDPwhbYfuDrbnBK1030FuVWGBHWwdgCFY/edit#gid=2107265838
Are shaders being generated at build time on Android?
Comment 5•4 years ago
|
||
The optimized shaders are generated at build time, but they still need to be compiled at runtime, once per Firefox profile.
The fact that our pageload tests exercise shader compilation is still tracked by bug 1624331, which remains unfixed.
Description
•