Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step095-emscripten Webassembly Issue #46

Open
john12-sys opened this issue Aug 6, 2024 · 1 comment
Open

Step095-emscripten Webassembly Issue #46

john12-sys opened this issue Aug 6, 2024 · 1 comment

Comments

@john12-sys
Copy link

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?
WebAssemblyIssue

@adamdusty
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants