LearnWebGPU-Code
LearnWebGPU-Code copied to clipboard
Step095-emscripten Webassembly Issue
Hello,
I downloaded the code from the following GitHub repository: LearnWebGPU-Code (step095-emscripten). After building the WebGPU project in WebAssembly, I encountered an error screen while browsing to http://localhost:8000/App.html.
Could anyone please help me with the above?
Emscripten requires wgpuCreateInstance takes a nullptr for the instance descriptor pointer.
https://github.com/emscripten-core/emscripten/blob/main/system/lib/webgpu/webgpu.cpp#L23-L26
You can either
wgpuCreateInstance(nullptr);
// or
auto instance = reinterpret_cast<WGPUInstance>(1);