Add Inspector to doc
This CL adds the inspector into the architecture document.
Change-Id: I17f06e0ae29398a39b5082b0b4399c9c5e65769f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29800
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
diff --git a/docs/arch.md b/docs/arch.md
index 0523bad..f708ae2 100644
--- a/docs/arch.md
+++ b/docs/arch.md
@@ -5,7 +5,6 @@
| SPIR-V | | WGSL |
+----|---+ +---|--+
| |
- | |
+---------|---------------------------|--------+
| | Reader | |
| | | |
@@ -14,27 +13,26 @@
| +--------------+ +-------------+ |
+-----------------------|----------------------+
|
- |
+--|--+ +---------+
| AST |------| IsValid |
+--|--+ +---------+
|
- |
+--------|--------+
| Type Determiner |
+--------|--------+
|
- |
+-----|-----+
| Validator |
+-----|-----+
|
+ +-----|-----+
+ | Inspector |
+ +-----|-----+
|
+------|-----+
| Transforms |
+------|-----+
|
- |
+-------------------------------------|------------------------------------+
| Writer |
| |
@@ -43,8 +41,6 @@
| +-------|------+ +------|------+ +------|------+ +------|-----+ |
+---------|------------------|------------------|------------------|-------+
| | | |
- | | | |
- | | | |
+----|---+ +---|--+ +---|--+ +--|--+
| SPIR-V | | WGSL | | HLSL | | MSL |
+--------+ +------+ +------+ +-----+
@@ -76,6 +72,12 @@
After the validation step the AST should be a known valid WGSL program.
+## Inspector
+
+The inspectors job is to go through the AST and pull out various pieces of
+information. The information may be used to pass information into the downstream
+compilers (things like specialization constants) or may be used to pass into
+transforms to update the AST before generating the resulting code.
## Transforms