Update spirv-reader readme

Change-Id: I933cab554b3bbd278a23b892535cba4992649002
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48760
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Alan Baker <alanbaker@google.com>
Commit-Queue: Alan Baker <alanbaker@google.com>
This commit is contained in:
David Neto 2021-04-22 12:54:43 +00:00 committed by Commit Bot service account
parent 943ded79d2
commit 261642e4e3
1 changed files with 14 additions and 16 deletions

View File

@ -13,27 +13,25 @@ It's usable from the Tint command line:
# Translate SPIR-V into WGSL.
tint --format wgsl a.spv
## Validation
## Supported dialects
The SPIR-V module must pass validation for the `SPV_ENV_WEBGPU_0` target
environment in SPIRV-Tools.
The SPIR-V module must pass validation for the Vulkan 1.1 environment in SPIRV-Tools.
In particular, SPIR-V 1.4 and later are not supported.
That set of rules is _experimental_ and was originally intended
to constraint SPIR-V modules being ingested directly by the WebGPU API.
Those rules are now too restrictive, because some amount of sanitization
and normalization occurs during translation from SPIR-V to WGSL.
The validation rules will be relaxed at some point TBD.
For example, the equivalent of the following must pass:
Generally, validation of _functionality_ used will remain, e.g. WebGPU currently
does not support `CullDistance` or subgroup operations.
spirv-val --target-env vulkan1.1 a.spv
However, detailed rules about the form of SPIR-V can be relaxed, e.g. the
requirement to use SPIR-V 1.3, and restrictive rules about statically unreachable
code.
Additionally, the reader imposes additional constraints based on:
* The features supported by WGSL. Some Vulkan features might not be supportable because
WebGPU must be portable to other graphics APIs.
* Limitations of the reader itself. These might be relaxed in the future with extra
engineering work.
## Feedback
Please file issues at https://crbug.com/tint, and put `spirv-reader` in the issue title.
Please file issues at https://crbug.com/tint, and apply label `SpirvReader`.
Outstanding issues can be found by using the `spirv-reader` label in the Chromium project's
bug tracker: https://bugs.chromium.org/p/tint/issues/list?q=label:spirv-reader
Outstanding issues can be found by using the `SpirvReader` label in the Chromium project's
bug tracker: https://bugs.chromium.org/p/tint/issues/list?q=label:SpirvReader