On 6/25/2013 11:18 AM, Chris Endicott
wrote:
Hm, it sounds like what you really want, for this in particular, is a way to cache compiled shaders. We were thinking of doing this under the hood anyway as we can do it transparently by hashing source + compiler details (especially when using D3D via ANGLE, by caching the bytecode). That should largely remove this bottleneck for you. The thing with GL context share groups, as soon as you touch contexts in a share group from different threads, you flip on all sorts of locking/sync primitives in the GL drivers, which results in an overall perf hit. I think you'd get this even if you were to only use the other context to compile shaders. Of course, that might not be the case for a D3D-backed GL, but as mobile WebGL is increasingly becoming viable, straight GL implementations are going to become more common. - Vlad |