-
Notifications
You must be signed in to change notification settings - Fork 190
CMake + Dawn + Emscripten Build Refactor #76
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
Conversation
|
With the new commits, all the examples should compile for emscripten and output files in the build folder for js, wasm, and html. @austinvhuang let me know if you are cool with changing the import to "webgpu.h" vs "webgpu/webgpu.h". This makes CMake life easier as none of the generation from dawn outputs as "webgpu/webgpu.h". I needed to also rename the main function in half.cpp. Since this is included via gpu.hpp it causes conflicts with the main from the run program in examples. With gpu.cpp being a library we should avoid any use of main within included files. Try it with:
|
Replying here for visibility - but as discussed in discord, let's try the "webgpu.h" w/o the path. There's probably some fixes in the Makefiles but we can workshop that in the dev branch before merging to main. |
We are now building the latest dawn. Specific commits can be pinned by adding a commit hash in cmake/gpu.cmake.
git fetch --depth=1 https://dawn.googlesource.com/dawn <commit hash>Please try a few examples on other platforms and let me know if there are any issues 👍
From examples/hello_world
cmake -S . build/ -DCMAKE_BUILD_TYPE=Releasecmake --build build/ --config Release