mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fixes #1745: Support out-of-order module scope declarations in WGSL Fixes #1044: Forbid local variable shadowing in WGSL Fixes #2076: [wgsl-in] no error for duplicated type definition Fixes #2071: Global item does not support 'const' Fixes #2105: [wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument Fixes #1775: Referencing a function without a return type yields an unknown identifier error. Fixes #2089: Error span reported on the declaration of a variable instead of its use Fixes #1996: [wgsl-in] Confusing error: "expected unsigned/signed integer literal, found '1'" Separate parsing from lowering by generating an AST, which desugars as much as possible down to something like Naga IR. The AST is then used to resolve identifiers while lowering to Naga IR. Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com> Co-authored-by: Jim Blandy <jimb@red-bean.com>
105 lines
4.0 KiB
Plaintext
105 lines
4.0 KiB
Plaintext
digraph Module {
|
|
subgraph cluster_globals {
|
|
label="Globals"
|
|
g0 [ shape=hexagon label="[1] Handle/'u_texture'" ]
|
|
g1 [ shape=hexagon label="[2] Handle/'u_sampler'" ]
|
|
}
|
|
subgraph cluster_ep0 {
|
|
label="Vertex/'vert_main'"
|
|
node [ style=filled ]
|
|
ep0_e0 [ color="#8dd3c7" label="[1] Argument[0]" ]
|
|
ep0_e1 [ color="#8dd3c7" label="[2] Argument[1]" ]
|
|
ep0_e2 [ fillcolor="#ffffb3" label="[3] Constant" ]
|
|
ep0_e3 [ color="#fdb462" label="[4] Multiply" ]
|
|
ep0_e0 -> ep0_e3 [ label="right" ]
|
|
ep0_e2 -> ep0_e3 [ label="left" ]
|
|
ep0_e4 [ fillcolor="#ffffb3" label="[5] Constant" ]
|
|
ep0_e5 [ fillcolor="#ffffb3" label="[6] Constant" ]
|
|
ep0_e6 [ color="#bebada" label="[7] Compose" ]
|
|
{ ep0_e3 ep0_e4 ep0_e5 } -> ep0_e6
|
|
ep0_e7 [ color="#bebada" label="[8] Compose" ]
|
|
{ ep0_e1 ep0_e6 } -> ep0_e7
|
|
ep0_s0 [ shape=square label="Root" ]
|
|
ep0_s1 [ shape=square label="Emit" ]
|
|
ep0_s2 [ shape=square label="Emit" ]
|
|
ep0_s3 [ shape=square label="Return" ]
|
|
ep0_s0 -> ep0_s1 [ arrowhead=tee label="" ]
|
|
ep0_s1 -> ep0_s2 [ arrowhead=tee label="" ]
|
|
ep0_s2 -> ep0_s3 [ arrowhead=tee label="" ]
|
|
ep0_e7 -> ep0_s3 [ label="value" ]
|
|
ep0_s1 -> ep0_e3 [ style=dotted ]
|
|
ep0_s2 -> ep0_e6 [ style=dotted ]
|
|
ep0_s2 -> ep0_e7 [ style=dotted ]
|
|
}
|
|
subgraph cluster_ep1 {
|
|
label="Fragment/'frag_main'"
|
|
node [ style=filled ]
|
|
ep1_e0 [ color="#8dd3c7" label="[1] Argument[0]" ]
|
|
ep1_e1 [ color="#ffffb3" label="[2] Global" ]
|
|
g0 -> ep1_e1 [fillcolor=gray]
|
|
ep1_e2 [ color="#ffffb3" label="[3] Global" ]
|
|
g1 -> ep1_e2 [fillcolor=gray]
|
|
ep1_e3 [ color="#80b1d3" label="[4] ImageSample" ]
|
|
ep1_e2 -> ep1_e3 [ label="sampler" ]
|
|
ep1_e1 -> ep1_e3 [ label="image" ]
|
|
ep1_e0 -> ep1_e3 [ label="coordinate" ]
|
|
ep1_e4 [ color="#8dd3c7" label="[5] AccessIndex[3]" ]
|
|
ep1_e3 -> ep1_e4 [ label="base" ]
|
|
ep1_e5 [ fillcolor="#ffffb3" label="[6] Constant" ]
|
|
ep1_e6 [ color="#fdb462" label="[7] Equal" ]
|
|
ep1_e5 -> ep1_e6 [ label="right" ]
|
|
ep1_e4 -> ep1_e6 [ label="left" ]
|
|
ep1_e7 [ color="#8dd3c7" label="[8] AccessIndex[3]" ]
|
|
ep1_e3 -> ep1_e7 [ label="base" ]
|
|
ep1_e8 [ color="#fdb462" label="[9] Multiply" ]
|
|
ep1_e3 -> ep1_e8 [ label="right" ]
|
|
ep1_e7 -> ep1_e8 [ label="left" ]
|
|
ep1_s0 [ shape=square label="Root" ]
|
|
ep1_s1 [ shape=square label="Emit" ]
|
|
ep1_s2 [ shape=square label="Emit" ]
|
|
ep1_s3 [ shape=square label="Emit" ]
|
|
ep1_s4 [ shape=square label="If" ]
|
|
ep1_s5 [ shape=square label="Node" ]
|
|
ep1_s6 [ shape=square label="Kill" ]
|
|
ep1_s7 [ shape=square label="Node" ]
|
|
ep1_s8 [ shape=square label="Merge" ]
|
|
ep1_s9 [ shape=square label="Emit" ]
|
|
ep1_s10 [ shape=square label="Return" ]
|
|
ep1_s0 -> ep1_s1 [ arrowhead=tee label="" ]
|
|
ep1_s1 -> ep1_s2 [ arrowhead=tee label="" ]
|
|
ep1_s2 -> ep1_s3 [ arrowhead=tee label="" ]
|
|
ep1_s3 -> ep1_s4 [ arrowhead=tee label="" ]
|
|
ep1_s5 -> ep1_s6 [ arrowhead=tee label="" ]
|
|
ep1_s4 -> ep1_s5 [ arrowhead=tee label="accept" ]
|
|
ep1_s4 -> ep1_s7 [ arrowhead=tee label="reject" ]
|
|
ep1_s6 -> ep1_s8 [ arrowhead=tee label="" ]
|
|
ep1_s7 -> ep1_s8 [ arrowhead=tee label="" ]
|
|
ep1_s8 -> ep1_s9 [ arrowhead=tee label="" ]
|
|
ep1_s9 -> ep1_s10 [ arrowhead=tee label="" ]
|
|
ep1_e6 -> ep1_s4 [ label="condition" ]
|
|
ep1_e8 -> ep1_s10 [ label="value" ]
|
|
ep1_s1 -> ep1_e3 [ style=dotted ]
|
|
ep1_s2 -> ep1_e4 [ style=dotted ]
|
|
ep1_s3 -> ep1_e6 [ style=dotted ]
|
|
ep1_s9 -> ep1_e7 [ style=dotted ]
|
|
ep1_s9 -> ep1_e8 [ style=dotted ]
|
|
}
|
|
subgraph cluster_ep2 {
|
|
label="Fragment/'fs_extra'"
|
|
node [ style=filled ]
|
|
ep2_e0 [ fillcolor="#ffffb3" label="[1] Constant" ]
|
|
ep2_e1 [ fillcolor="#ffffb3" label="[2] Constant" ]
|
|
ep2_e2 [ fillcolor="#ffffb3" label="[3] Constant" ]
|
|
ep2_e3 [ fillcolor="#ffffb3" label="[4] Constant" ]
|
|
ep2_e4 [ fillcolor="#bebada" label="[5] Compose" ]
|
|
{ ep2_e0 ep2_e1 ep2_e2 ep2_e3 } -> ep2_e4
|
|
ep2_s0 [ shape=square label="Root" ]
|
|
ep2_s1 [ shape=square label="Emit" ]
|
|
ep2_s2 [ shape=square label="Return" ]
|
|
ep2_s0 -> ep2_s1 [ arrowhead=tee label="" ]
|
|
ep2_s1 -> ep2_s2 [ arrowhead=tee label="" ]
|
|
ep2_e4 -> ep2_s2 [ label="value" ]
|
|
ep2_s1 -> ep2_e4 [ style=dotted ]
|
|
}
|
|
}
|