[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Support precompiled shaders as extensions



Interesting, but spawning a new GL context/process for each shader compilation "thread" isn't really a nice way to do things, particularly not on mobiles.

On Fri, Nov 25, 2016 at 5:09 AM, Mark Callow <khronos@callow.im> wrote:

On 2016 Nov 25, at 0:38, Florian Bösch <pyalot@gmail.com> wrote:

Sorry, I was confusing them with framebuffer objects which (at least in some implementations) you can't share. However it is usually the case that operations done on resources in one context need to be completely finished before any of their state can be shared with another context (i.e. you have to invoke a blocking call such as getting the compile status, or calling glFinish), I'm sure similar restrictions apply to D3D.

In OpenGL {ES} I think you can call glFenceSync after the compile/link commands and in the thread on the other context you can check for completion with glClientWaitSync with a timeout of 0. WebGL 2 has sync objects too.

Regards

    -Mark