[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Caching shader compile assembly
On Wed, May 2, 2012 at 2:50 PM, Conor Dickinson <email@example.com>
Not sure if this email should go to this mailing list or not, so if there is a better place for this please let me know.
I have found that calls to linkProgram for our shaders take between 300 ms and 800 ms on Windows in Firefox and Chrome, but on Mac they take less than 10 ms. My guess is that the extra time comes from the GLSL -> HLSL -> assembly conversion that doesn't happen on Mac (I know that HLSL -> assembly is extremely slow because of all the optimizations that D3D runs on the shaders).
For us this is taking about 6 to 8 seconds of our load time even if all of our assets are in the browser cache. Is there any way that the browser can cache the results of the shader compiling so that subsequent visits to our app do not take so long to load? I can definitely understand not wanting to give us back the assembled shaders to cache ourselves (for privacy reasons), but it seems reasonable for the browser to cache the results based on the shader string, GPU, and driver version.
For chrome it's on our todo list
no ETA though
Cloud Party, Inc.