You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sample works, as is. But I also want PROXY_TO_PTHREAD because I need to wait for threads on the main thread.
The sample uses GLFW for window creation and surface setup. This already doesn't seem to work well. glfwInit() already fails, if I run it on my apps main thread.
That seems to get around the first issue. However, quickly I run into various other issues. For example the "device" is not accessible on all threads, I found OFFSCREENCANVAS_SUPPORT and tried that, that seems to make some stuff work and break others.
And so on and so forth. It would be very tedious to write down all the ways that this endeavor failed.
So my question is, is it generally possible to use WebGPU today (with emsdk 3.1.65) using PROXY_TO_PTHREAD ? Does anyone have a sample that shows which hoops one has to jump through to make it work?
I'm also wondering whether the issues are mainly in GLFW (which seems to assume that it always runs on the browser thread). Maybe rolling my own for window setup could make this work? Again, if someone has a working example somewhere, that would be very helpful.
The text was updated successfully, but these errors were encountered:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.65 (7f8a05d)
clang version 20.0.0git (https:/github.com/llvm/llvm-project 547917aebd1e79a8929b53f0ddf3b5185ee4df74)
Target: wasm32-unknown-emscripten
Thread model: posix
I am using this sample to figure out how to get started with porting an engine to Emscripten + WebGPU:
https://developer.chrome.com/docs/web-platform/webgpu/build-app
The sample works, as is. But I also want
PROXY_TO_PTHREAD
because I need to wait for threads on the main thread.The sample uses GLFW for window creation and surface setup. This already doesn't seem to work well.
glfwInit()
already fails, if I run it on my apps main thread.I can proxy it to the browser thread with this:
That seems to get around the first issue. However, quickly I run into various other issues. For example the "device" is not accessible on all threads, I found
OFFSCREENCANVAS_SUPPORT
and tried that, that seems to make some stuff work and break others.And so on and so forth. It would be very tedious to write down all the ways that this endeavor failed.
So my question is, is it generally possible to use WebGPU today (with emsdk 3.1.65) using
PROXY_TO_PTHREAD
? Does anyone have a sample that shows which hoops one has to jump through to make it work?I'm also wondering whether the issues are mainly in GLFW (which seems to assume that it always runs on the browser thread). Maybe rolling my own for window setup could make this work? Again, if someone has a working example somewhere, that would be very helpful.
The text was updated successfully, but these errors were encountered: