Skip to content

Commit 662ca99

Browse files
committed
Misc: Added wgpu-native headers and a readme
1 parent 1c21989 commit 662ca99

File tree

4 files changed

+4189
-0
lines changed

4 files changed

+4189
-0
lines changed

wgpu/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SDL3 WebGPU Support
2+
3+
# Native support
4+
To support WebGPU natively (mostly for debugging purposes), you'll have to fetch your flavour of WebGPU from:
5+
6+
- [wgpu-native](https://github.com/gfx-rs/wgpu-native) ([prebuilt](https://github.com/gfx-rs/wgpu-native/releases/))
7+
- [Dawn](https://dawn.googlesource.com/dawn) (Source)
8+
9+
Once you have your libraries compiled copy the resulting library into `./lib` and the provided or preduced headers into `./include/webgpu/`.
10+
11+
Once this has been done you can compile with the following instructions:
12+
13+
```
14+
cmake .. -DCMAKE_BUILD_TYPE=Release -DSDL_WEBGPU=ON -DSDL_RENDER_WEBGPU=ON
15+
cmake --build . --config Release --parallel
16+
sudo cmake --install . --config Release
17+
```
18+
19+
# Browser support
20+
The current Emscripten version of webgpu.h is behind both wgpu-native and Dawn which conflicts with callbacks and how strings are passed to WebGPU resources.
21+
For now I've put browser support on the backburner until I've tested using wgpu-native and Dawn.
22+
23+
# webgpu.h
24+
The goal is to eventually just provide the [webgpu.h](https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h) and then have the developer provide their library of choice, or use emcc to target the browser.

0 commit comments

Comments
 (0)