Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jan 6, 2025
1 parent 7cedebe commit c620439
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ jobs:
npm ci
node build/prep-for-publish.js
- name: Publish to NPM 📖
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .

- name: Publish to NPM 📖
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,25 @@ Object.assign(globalThis, globals);
globalThis.navigator = { gpu: create([]) };

...

// do some webgpu
const device = await(await navigator.gpu.requestAdapter()).requestDevice();
```

You can pass dawn options in `create`

```js
let navigator = {
gpu: create([
"enable-dawn-features=allow_unsafe_apis,dump_shaders,disable_symbol_renaming",
]),
};
```

There is both `enable-dawn-features=comma,separated,toggles` and `disable-dawn-features=comma,separated,toggles`.

The available options are listed [here](https://dawn.googlesource.com/dawn/+/refs/heads/chromium-gpu-experimental/src/dawn_native/Toggles.cpp)

## Notes

This package provides a WebGPU implementation it node. That said, if you are making a webpage
Expand Down

0 comments on commit c620439

Please sign in to comment.