Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
bin/ | 12-May-2024 | - | 33 | 13 | ||
src/ | 12-May-2024 | - | 6,402 | 5,800 | ||
tests/ | 12-May-2024 | - | 74 | 67 | ||
tools/ | 12-May-2024 | - | 120 | 88 | ||
.eslintrc.json | D | 12-May-2024 | 642 | 26 | 25 | |
.gitignore | D | 12-May-2024 | 76 | 7 | 6 | |
README.md | D | 12-May-2024 | 1.1 KiB | 42 | 30 | |
mocha.opts | D | 12-May-2024 | 12 | 2 | 1 | |
package.json | D | 12-May-2024 | 648 | 26 | 25 | |
rollup.config.js | D | 12-May-2024 | 103 | 8 | 7 | |
yarn.lock | D | 12-May-2024 | 72 KiB | 1,779 | 1,519 |
README.md
1# SVA 2 3SPIR-V Assember for WebGPU. The SPIR-V Assembler is a JavaScript library to 4convert SPIR-V assembly (as produced by spirv-dis in SPIR-V Tools) into a 5SPIR-V binary. The assembler assumes it is generating WebGPU SPIR-V and thus has 6the following limitations. 7 8 * Only 32 bit integers and floats supported 9 * Only GLSL accepted as an extended instruction set 10 * Doesn't support ! syntax for integers 11 * Doesn't support hex encoding for float 12 13```shell 14yarn install 15yarn test 16``` 17 18You can also use `yarn watch` to watch all of the files and re-run tests as 19needed. 20 21## Webserver 22Using `yarn serve` will start a webserver on localhost:5000. If you load the 23`tests/index.html` file this will load the SVA files into browser. 24 25## Command Line 26There is a simple assembler binary with can be executed from the command line. 27 28```shell 29yarn sva tests/simple.spv_asm 30``` 31 32The above will generate a `o.sva` file in the current directory. 33 34## Update spirv.data.json 35 36If there is a new spirv-headers release update the externals folder checkout 37and then: 38 39```shell 40./tools/process_grammar.rb > src/spirv.data.json 41``` 42