gpu.js icon indicating copy to clipboard operation
gpu.js copied to clipboard

Truly asynchronous kernel API support

Open fuzzie360 opened this issue 10 years ago • 7 comments

Currently all APIs are blocking and will freeze the main thread if the kernel is computationally large.

Challenges:

  • No asynchronous API for WebGL exists (Blocker)

fuzzie360 avatar Feb 19 '16 11:02 fuzzie360

https://github.com/kripken/webgl-worker

No idea if it would help lol

PicoCreator avatar Feb 24 '16 10:02 PicoCreator

The blog post for webgl-worker said async calls cannot be implemented by their method.

fuzzie360 avatar Feb 24 '16 10:02 fuzzie360

So we got no choice but to use webworkers i assume =( ?

PicoCreator avatar Feb 25 '16 04:02 PicoCreator

WebGL does not work in WebWorkers (yet). Waiting on this: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/transferControlToOffscreen

fuzzie360 avatar Feb 25 '16 15:02 fuzzie360

Lol. so we gotta wait 3 years before it becomes standard in browser? if it makes it there.

Anyway i will update the API to support "ASYNC". - For the future !

PicoCreator avatar Feb 26 '16 08:02 PicoCreator

There's already async on the webworker branch

fuzzie360 avatar Feb 26 '16 09:02 fuzzie360

Merged in 036bc66e5694d8bf3b2e6a14aecd04da01ff41fa

PicoCreator avatar Mar 12 '16 16:03 PicoCreator