js-slang
js-slang copied to clipboard
Add new variant: Source 2 WGSL
Description
Source §2 WGSL utilizes the WebGPU API to accelerate GPU-based operations for Source programs. This modern web standard enables efficient rendering and data processing directly from web browsers. Specifically, in Source §2 WGSL, when a Source program invokes the play function from the Sound module, the wave function of the sound to be played undergoes partial evaluation and is transpiled into the WebGPU Shading Language (WGSL). This process significantly enhances sound processing speed on the GPU using WebGPU APIs.
Changes
- Source code and testing for this interpreter are under
src/wgsl
- Documentation and specs for this new variant.
Pull Request Test Coverage Report for Build 8408397023
Details
- 458 of 621 (73.75%) changed or added relevant lines in 12 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.3%) to 80.702%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
src/wgsl/types.ts | 27 | 31 | 87.1% |
src/wgsl/lib.ts | 9 | 18 | 50.0% |
src/wgsl/utils.ts | 119 | 129 | 92.25% |
src/wgsl/webgpu/initDevice.ts | 2 | 18 | 11.11% |
src/wgsl/operations.ts | 17 | 34 | 50.0% |
src/wgsl/webgpu/play_gpu.ts | 2 | 40 | 5.0% |
src/wgsl/interpreter.ts | 237 | 306 | 77.45% |
<!-- | Total: | 458 | 621 |
Totals | |
---|---|
Change from base Build 8405750861: | -0.3% |
Covered Lines: | 10963 |
Relevant Lines: | 13185 |
💛 - Coveralls
@Ziwen510 can you take a look at the merge conflicts? It would probably not take much of your time to fix these so that the review can proceed. Tx.
@martin-henz @JoelChanZhiYang Merge conflicts are all resolved! Feel free to ask me for any other problems.