Re: Notes from meeting with WASM WG at TPAC

On Fri, Nov 10, 2017 at 8:14 AM, Dzmitry Malyshau <dmalyshau@mozilla.com>
 wrote:

> Thanks Corentin for an extensive report!
>
> In general, how was the reception of NXT demo? What where you able to show
> in the end?
>
> A few questions about the report:
>
> > In emscriptem headers for WebGPU some function calls will have special
> attributes that make them call into the Web engine directly without going
> through JS.
>
> Assuming this is faster and desirable in general, what are the
> conditions/requirements for a function to be called directly without JS?
>

The notes from the WebAssembly meeting where this was discussed should help:

https://github.com/WebAssembly/meetings/blob/master/2017/CG-11.md#
javascript-bindings-for-webassembly


The proposal is here:

https://github.com/WebAssembly/host-bindings/blob/master/proposals/host-
bindings/Overview.md



> Callbacks into WASM are a bit of a slow path.
>
> Let's not use callbacks then?
>
> > Some objects could be stuck on one thread by having the host binding
> table not shared. between workers.
>
> A bit of an off-topic, but it would be really interesting to see if this
> semantics could be routed from Rust directly thanks to Send/Sync traits.
>
> > Command buffer building will not be possible on multiple threads in
> parallel
>
> Why? I believe this is critical to get right.
>

I think the problem comes from WebAssembly only supporting a single memory
per instance at the moment. With the threading proposal that memory can be
shared, like a SharedArrayBuffer, but it's not a free-standing memory than
you can then hand-off to the GPU without copy.

Received on Friday, 10 November 2017 15:45:43 UTC