[Mesa-users] How shaders are compiled?
Sławomir Lach
slawek at lach.art.pl
Sat Apr 1 18:50:37 UTC 2023
I only asks.
How shaders are compiled? I known, there is many problems with shader
compilation, like users are forced to stay in game menu to wait for shader
compilation are done.
I known, many software uses approach with two or more compilers. For example,
Mozilla Firefox launch fast-compiler firstly to be able to ran JavaScript
scripts and recompile scripts by compiler do better optimizations.
Maybe Mesa should do the same? And yet. We have shader cache, so you could
implement daemon which runs on system-idle state and recompile not-well-
optimized shaders to more optimized versions.
When game asks Mesa to compile shader, it does:
1. Ran fast-compiler
2. Register output of 1. to daemon
3. Run compiler doing good-optimizations
And daemon do good optimization on system-idle.
Best regards,
Lach Sławomir.
More information about the mesa-users
mailing list