emscripten-core / emscripten-core/emscripten

Question: Using WebGPU without enabled ASYNCIFY flag

Open
#22,207 12 comments 0 reactions 0 assignees View on GitHub
webgpu
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Is there a way to interact with the current version of WebGPU without using the `ASYNCIFY` flag? Functions like `wgpuInstanceRequestAdapter`, `wgpuAdapterRequestDevice`, and `wgpuBufferMapAsync` require calling `emscripten_sleep` (which in turn requires using `ASYNCIFY`). Enabled `ASYNCIFY` significantly increases the program size (in my case from 10MB to 18MB). Besides this, the linking time becomes several minutes in Release mode, and when building in Debug mode, I get a runtime error https://github.com/emscripten-core/emscripten/issues/19346

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.