README.md
1# SPIR-V Reader 2 3This component translates SPIR-V written for Vulkan into the Tint AST. 4 5The SPIR-V reader entry point is `tint::reader::spirv::Parser`, which 6implements the Reader interface in `tint::reader::Reader`. 7 8It's usable from the Tint command line: 9 10 # Translate SPIR-V into WGSL. 11 tint --format wgsl a.spv 12 13## Supported dialects 14 15The SPIR-V module must pass validation for the Vulkan 1.1 environment in SPIRV-Tools. 16In particular, SPIR-V 1.4 and later are not supported. 17 18For example, the equivalent of the following must pass: 19 20 spirv-val --target-env vulkan1.1 a.spv 21 22Additionally, the reader imposes additional constraints based on: 23 24* The features supported by WGSL. Some Vulkan features might not be supportable because 25 WebGPU must be portable to other graphics APIs. 26* Limitations of the reader itself. These might be relaxed in the future with extra 27 engineering work. 28 29## Feedback 30 31Please file issues at https://crbug.com/tint, and apply label `SpirvReader`. 32 33Outstanding issues can be found by using the `SpirvReader` label in the Chromium project's 34bug tracker: https://bugs.chromium.org/p/tint/issues/list?q=label:SpirvReader 35