freedreno: async background shader compile
Loading shadertoy.com front page is a bit painful, esp when all gl calls are funneled thru a single thread in chrome/ium gpu-process.
One idea would be farming out actual shader compile to a threadpool, and defer blocking until the first draw using a shader. I'm not entirely sure how the different webgl contexts are interleaved, but hopefully we can start all or most of the compiles before hitting the first draw?
Possibly we might want to start with a minimally optimized shader, and swap it out for a more optimized shader at a later draw. That sounds somewhat more painful, and full of sharp edges (like cases where we need to optimize to not RA fail). But I guess that would still build on the background-compile threadpool idea.
Also, draw-time shader-variants are another sharp-edge, but hopefully at least for gles we don't have too many of those.
I assume this is the sort of thing that vk/turnip explicitly doesn't want, and should be done in gallium?