A lightweight playground for experimenting with WebGPU compute shaders using the native C++ API. This project builds on top of the Dawn project, which is an open-source implementation of the WebGPU standard. It provides a basic framework to write, build, and run WebGPU compute pipelines directly from C++, allowing for low-level control and experimentation without the browser environment.
-
Clone the Repository:
git clone https://github.com/daijh/wgpu_compute_playground.git cd webgpu_compute_playground
-
Initialize/Update Submodules:
git submodule update --init
-
Build the Project:
cmake -S . -B build cmake --build build -j8
-
Run:
Known Issue on Windows: You might need to copy
D3DCompiler_47.dll
andvulkan-1.dll
fromC:\Windows\System32
into thebuild\wgpu\Debug\
directory for the application to run correctly.# Windows build\wgpu\Debug\basic_compute.exe # Linux build/wgpu/basic_compute
Contributions are welcome! If you have any ideas for improvements, new features, or bug fixes, feel free to open an issue or submit a pull request.
This project is licensed under the BSD 3-Clause "New" or "Revised" License. See the LICENSE
file for more information.