-
Notifications
You must be signed in to change notification settings - Fork 3.4k
wgpuInstanceCreateSurface fails because document is undefined #20211
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
Comments
It looks like you are maybe trying to use webgpu from a worker thread? is that correct? Are you starting the application in a worker, or are you attempting to use this API from a pthread perhaps? |
I'm not using a worker thread, but I am using asyncify. Could that also cause issues? |
If you are not using a worker then how could |
I am not manually creating any worker threads, but I am also using |
I have change that proxies the webgpu calls back to the main thread: #20124. Hopefully once this change lands it will fix your problem. |
I am trying to create a Surface from an HTML element:
However, this call fails because in calling
findCanvasEventTarget
it callsfindEventTarget
, wheredocument
is undefined and so returns undefined.Stack trace and output:

Version of emscripten/emsdk:
Browser version:
Chromium Version 118.0.5987.0 (Developer Build) (64-bit)
The text was updated successfully, but these errors were encountered: