mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-26 21:30:07 +00:00
a1f5556517
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.3. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/y18n-v4.0.3/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/compare/v4.0.0...y18n-v4.0.3) --- updated-dependencies: - dependency-name: y18n dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
bin | ||
src | ||
tests | ||
tools | ||
.eslintrc.json | ||
.gitignore | ||
mocha.opts | ||
package.json | ||
README.md | ||
rollup.config.js | ||
yarn.lock |
SVA
SPIR-V Assembler for WebGPU. The SPIR-V Assembler is a JavaScript library to convert SPIR-V assembly (as produced by spirv-dis in SPIR-V Tools) into a SPIR-V binary. The assembler assumes it is generating WebGPU SPIR-V and thus has the following limitations.
- Only 32 bit integers and floats supported
- Only GLSL accepted as an extended instruction set
- Doesn't support ! syntax for integers
- Doesn't support hex encoding for float
yarn install
yarn test
You can also use yarn watch
to watch all of the files and re-run tests as
needed.
Webserver
Using yarn serve
will start a webserver on localhost:5000. If you load the
tests/index.html
file this will load the SVA files into browser.
Command Line
There is a simple assembler binary with can be executed from the command line.
yarn sva tests/simple.spv_asm
The above will generate a o.sva
file in the current directory.
Update spirv.data.json
If there is a new spirv-headers release update the externals folder checkout and then:
./tools/process_grammar.rb > src/spirv.data.json