WebGPU status

54 views
Skip to first unread message

Roderick Kennedy

unread,
Sep 24, 2021, 4:51:47 PM9/24/21
to emscripten-discuss
Is WebGPU currently supported? The tip-of-tree branch sample webgpu_basic_rendering.cpp crashes for me in makeFragmentState from _wgpuDeviceCreateRenderPipeline on Chrome dev. The latest branch lacks a compilable sample.

If this should work I'll persist, but if it's not ready I'm happy to wait.

Thanks,
Roderick

Floh

unread,
Sep 25, 2021, 7:15:39 AM9/25/21
to emscripten-discuss
AFAIK you can look for commits by github user kainino0x to keep track of WebGPU updates in the Emscripten SDK, for instance there was a commit just yesterday: https://github.com/emscripten-core/emscripten/pull/15063

Cheers,
-Floh.


Roderick Kennedy

unread,
Sep 25, 2021, 8:39:12 AM9/25/21
to emscripten-discuss
Thanks. Just pulling latest today fixed the error at tot branch, so I'll push ahead cautiously.

Jukka Jylänki

unread,
Sep 25, 2021, 1:07:50 PM9/25/21
to emscripte...@googlegroups.com
I am currently working on another Emscripten WebGPU support library at
https://github.com/juj/wasm_webgpu . The idea with that library is to
investigate minimizing generated code size, temporary JS garbage
generation and to maximize bindings performance.

It should be fairly complete as far as the API surface area goes, and
is up to date with current IDL as of today 09/25/2021, although beyond
toy examples the library has not been particularly extensively tested.

There are a few standalone test cases in the repo, e.g. for a hello
world clear screen demo, see
https://github.com/juj/wasm_webgpu/blob/master/clear_screen/clear_screen.c

You can run live builds of the test cases at http://clb.confined.space/webgpu/

It deliberately uses a different function naming convention to not be
mixed with the official WebGPU header. The API header can be found at
https://github.com/juj/wasm_webgpu/blob/master/lib/lib_webgpu.h .

If you'd like to experiment with that bindings library, you'd deploy
files in https://github.com/juj/wasm_webgpu/blob/master/lib/ to your
own project, and check out the needed build flags in
https://github.com/juj/wasm_webgpu/blob/master/CMakeLists.txt .
> --
> You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/22d411eb-da60-4e99-9b4c-b27549207a6cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages