diff --git a/docs/arch.md b/docs/arch.md index 0523bad2f6..f708ae2ee1 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 @@ determination but is invalid.) 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