[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 11:50 PM, Conor Dickinson <conor@cloudpartyinc.com> wrote:
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).
I've observed this extremely sluggish behavior as well, there also seem to be cases where compilation of large-ish shaders takes significantly longer, or crashes the compiler altogether.

A compiled client side shader cache would be a lovely idea (based on source hash for example) regardless of performance differences, it can also take considerable time on macs and linux to compile 50 shaders.