Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebGPU: consolidate all object tables, move some impl to "layered" we…
…bgpu.cpp I'm planning to move more implementation code into webgpu.cpp over time. For example, if we move the refcounts there, then they can be accessed from multiple threads. There are modest code size improvements from this change, though I haven't analyzed which changes had the most impact. I'll try that for later changes. Comparing by building with -O3 --closure=1 with this project: https://github.com/kainino0x/webgpu-cross-platform-demo - Before: hello.js: 29241 bytes / 11414 gzipped hello.wasm: 20858 bytes / 9563 gzipped total: 50099 bytes / 20997 gzipped - After: hello.js: 27883 bytes / 10944 gzipped hello.wasm: 20545 bytes / 9373 gzipped total: 48428 bytes / 20317 gzipped I suspect the .wasm code size reduction is due to inlining of Reference and Release calls that now all go to the same function.
- Loading branch information