mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-16 18:16:00 +00:00
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:
parent
943ded79d2
commit
261642e4e3
@ -13,27 +13,25 @@ It's usable from the Tint command line:
|
|||||||
# Translate SPIR-V into WGSL.
|
# Translate SPIR-V into WGSL.
|
||||||
tint --format wgsl a.spv
|
tint --format wgsl a.spv
|
||||||
|
|
||||||
## Validation
|
## Supported dialects
|
||||||
|
|
||||||
The SPIR-V module must pass validation for the `SPV_ENV_WEBGPU_0` target
|
The SPIR-V module must pass validation for the Vulkan 1.1 environment in SPIRV-Tools.
|
||||||
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
|
For example, the equivalent of the following must pass:
|
||||||
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.
|
|
||||||
|
|
||||||
Generally, validation of _functionality_ used will remain, e.g. WebGPU currently
|
spirv-val --target-env vulkan1.1 a.spv
|
||||||
does not support `CullDistance` or subgroup operations.
|
|
||||||
|
|
||||||
However, detailed rules about the form of SPIR-V can be relaxed, e.g. the
|
Additionally, the reader imposes additional constraints based on:
|
||||||
requirement to use SPIR-V 1.3, and restrictive rules about statically unreachable
|
|
||||||
code.
|
* 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
|
## 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
|
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:spirv-reader
|
bug tracker: https://bugs.chromium.org/p/tint/issues/list?q=label:SpirvReader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user