HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.

This needs some render testing, but is destined to be part of master.

This also leads to a variety of other simplifications.
 - IO are global symbols, so only need one list of linkage nodes (deferred)
 - no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized
 - several parts of splitting/flattening are now localized
This commit is contained in:
John Kessenich
2017-01-19 15:41:47 -07:00
parent 18adbdbbb8
commit 02467d8d94
171 changed files with 37604 additions and 32679 deletions

View File

@@ -1,11 +1,11 @@
hlsl.structin.vert
Shader version: 450
0:? Sequence
0:8 Function Definition: main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; (temp structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; (temp structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Parameters:
0:8 'd' (layout(location=0 ) in 4-component vector of float)
0:8 'd' (in 4-component vector of float)
0:8 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'e' (layout(location=5 ) in 4-component vector of float)
0:8 'e' (in 4-component vector of float)
0:? Sequence
0:11 move second child to first child (temp 4-component vector of float)
0:11 b: direct index for structure (temp 4-component vector of float)
@@ -16,56 +16,117 @@ Shader version: 450
0:11 add (temp 4-component vector of float)
0:11 add (temp 4-component vector of float)
0:11 add (temp 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:11 direct index (temp 4-component vector of float)
0:11 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:11 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 1 (const int)
0:11 direct index (temp 4-component vector of float)
0:11 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:11 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 Construct vec4 (temp 4-component vector of float)
0:11 Convert uint to float (temp float)
0:11 direct index (temp uint)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:11 coord: direct index for structure (temp 2-component vector of uint)
0:11 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 1 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 'd' (layout(location=0 ) in 4-component vector of float)
0:11 'e' (layout(location=5 ) in 4-component vector of float)
0:13 Sequence
0:13 Sequence
0:13 move second child to first child (temp 2-element array of 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 2-component vector of uint)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 move second child to first child (temp 4-component vector of float)
0:13 b: direct index for structure (smooth temp 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 b: direct index for structure (temp 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 Branch: Return
0:11 'd' (in 4-component vector of float)
0:11 'e' (in 4-component vector of float)
0:13 Branch: Return with expression
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Definition: main( (temp void)
0:8 Function Parameters:
0:? Sequence
0:8 move second child to first child (temp 4-component vector of float)
0:? 'd' (temp 4-component vector of float)
0:? 'd' (layout(location=0 ) in 4-component vector of float)
0:8 Sequence
0:8 move second child to first child (temp 4-component vector of float)
0:8 direct index (temp 4-component vector of float)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 0 (const int)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:8 move second child to first child (temp 4-component vector of float)
0:8 direct index (temp 4-component vector of float)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:8 move second child to first child (temp 2-component vector of uint)
0:8 coord: direct index for structure (temp 2-component vector of uint)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:8 move second child to first child (temp 4-component vector of float)
0:8 b: direct index for structure (temp 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float)
0:8 move second child to first child (temp 4-component vector of float)
0:? 'e' (temp 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float)
0:8 Sequence
0:8 move second child to first child (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; (temp structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'd' (temp 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'e' (temp 4-component vector of float)
0:8 move second child to first child (temp 2-element array of 4-component vector of float)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:8 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 move second child to first child (temp 2-component vector of uint)
0:8 coord: direct index for structure (temp 2-component vector of uint)
0:8 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 coord: direct index for structure (temp 2-component vector of uint)
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 move second child to first child (temp 4-component vector of float)
0:8 b: direct index for structure (smooth temp 4-component vector of float)
0:8 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:8 b: direct index for structure (temp 4-component vector of float)
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:? 'd' (layout(location=0 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
Linked vertex stage:
@@ -73,11 +134,11 @@ Linked vertex stage:
Shader version: 450
0:? Sequence
0:8 Function Definition: main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; (temp structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; (temp structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Parameters:
0:8 'd' (layout(location=0 ) in 4-component vector of float)
0:8 'd' (in 4-component vector of float)
0:8 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'e' (layout(location=5 ) in 4-component vector of float)
0:8 'e' (in 4-component vector of float)
0:? Sequence
0:11 move second child to first child (temp 4-component vector of float)
0:11 b: direct index for structure (temp 4-component vector of float)
@@ -88,150 +149,264 @@ Shader version: 450
0:11 add (temp 4-component vector of float)
0:11 add (temp 4-component vector of float)
0:11 add (temp 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:11 direct index (temp 4-component vector of float)
0:11 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:11 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 1 (const int)
0:11 direct index (temp 4-component vector of float)
0:11 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:11 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 0 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 Construct vec4 (temp 4-component vector of float)
0:11 Convert uint to float (temp float)
0:11 direct index (temp uint)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:11 coord: direct index for structure (temp 2-component vector of uint)
0:11 'vi' (in structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:11 Constant:
0:11 1 (const int)
0:11 Constant:
0:11 0 (const int)
0:11 'd' (layout(location=0 ) in 4-component vector of float)
0:11 'e' (layout(location=5 ) in 4-component vector of float)
0:13 Sequence
0:13 Sequence
0:13 move second child to first child (temp 2-element array of 4-component vector of float)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 0 (const int)
0:13 move second child to first child (temp 2-component vector of uint)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 coord: direct index for structure (temp 2-component vector of uint)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 1 (const int)
0:13 move second child to first child (temp 4-component vector of float)
0:13 b: direct index for structure (smooth temp 4-component vector of float)
0:13 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 b: direct index for structure (temp 4-component vector of float)
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:13 Constant:
0:13 2 (const int)
0:13 Branch: Return
0:11 'd' (in 4-component vector of float)
0:11 'e' (in 4-component vector of float)
0:13 Branch: Return with expression
0:13 'local' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Definition: main( (temp void)
0:8 Function Parameters:
0:? Sequence
0:8 move second child to first child (temp 4-component vector of float)
0:? 'd' (temp 4-component vector of float)
0:? 'd' (layout(location=0 ) in 4-component vector of float)
0:8 Sequence
0:8 move second child to first child (temp 4-component vector of float)
0:8 direct index (temp 4-component vector of float)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 0 (const int)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:8 move second child to first child (temp 4-component vector of float)
0:8 direct index (temp 4-component vector of float)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:8 move second child to first child (temp 2-component vector of uint)
0:8 coord: direct index for structure (temp 2-component vector of uint)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:8 move second child to first child (temp 4-component vector of float)
0:8 b: direct index for structure (temp 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float)
0:8 move second child to first child (temp 4-component vector of float)
0:? 'e' (temp 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float)
0:8 Sequence
0:8 move second child to first child (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; (temp structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'd' (temp 4-component vector of float)
0:? 'vi' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:? 'e' (temp 4-component vector of float)
0:8 move second child to first child (temp 2-element array of 4-component vector of float)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:8 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 m: direct index for structure (temp 2-element array of 4-component vector of float)
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 0 (const int)
0:8 move second child to first child (temp 2-component vector of uint)
0:8 coord: direct index for structure (temp 2-component vector of uint)
0:8 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 coord: direct index for structure (temp 2-component vector of uint)
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 1 (const int)
0:8 move second child to first child (temp 4-component vector of float)
0:8 b: direct index for structure (smooth temp 4-component vector of float)
0:8 '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:8 b: direct index for structure (temp 4-component vector of float)
0:8 'flattenTemp' (temp structure{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b})
0:8 Constant:
0:8 2 (const int)
0:? Linker Objects
0:? '@entryPointOutput' (out structure Position{temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, smooth temp 4-component vector of float b})
0:? 'd' (layout(location=0 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
0:? 'coord' (layout(location=3 ) in 2-component vector of uint)
0:? 'b' (layout(location=4 ) smooth in 4-component vector of float)
0:? 'e' (layout(location=5 ) in 4-component vector of float)
0:? 'm[0]' (layout(location=1 ) in 4-component vector of float)
0:? 'm[1]' (layout(location=2 ) in 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 61
// Id's are bound by 92
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 18 20 24 32 35 42 60
EntryPoint Vertex 4 "main" 48 51 54 58 62 66 78
Name 4 "main"
Name 12 "VI"
MemberName 12(VI) 0 "m"
MemberName 12(VI) 1 "coord"
MemberName 12(VI) 2 "b"
Name 14 "local"
Name 18 "m[1]"
Name 20 "m[0]"
Name 24 "coord"
Name 32 "d"
Name 35 "e"
Name 40 "VI"
MemberName 40(VI) 0 "m"
MemberName 40(VI) 1 "coord"
MemberName 40(VI) 2 "b"
Name 42 "@entryPointOutput"
Name 60 "b"
Decorate 18(m[1]) Location 2
Decorate 20(m[0]) Location 1
Decorate 24(coord) Location 3
Decorate 32(d) Location 0
Decorate 35(e) Location 5
Decorate 42(@entryPointOutput) BuiltIn Position
Decorate 60(b) Location 4
Name 13 "VI"
MemberName 13(VI) 0 "m"
MemberName 13(VI) 1 "coord"
MemberName 13(VI) 2 "b"
Name 19 "@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;"
Name 16 "d"
Name 17 "vi"
Name 18 "e"
Name 21 "local"
Name 46 "d"
Name 48 "d"
Name 50 "vi"
Name 51 "m[0]"
Name 54 "m[1]"
Name 58 "coord"
Name 62 "b"
Name 65 "e"
Name 66 "e"
Name 68 "flattenTemp"
Name 69 "param"
Name 71 "param"
Name 73 "param"
Name 76 "VI"
MemberName 76(VI) 0 "m"
MemberName 76(VI) 1 "coord"
MemberName 76(VI) 2 "b"
Name 78 "@entryPointOutput"
Decorate 48(d) Location 0
Decorate 51(m[0]) Location 1
Decorate 54(m[1]) Location 2
Decorate 58(coord) Location 3
Decorate 62(b) Location 4
Decorate 66(e) Location 5
Decorate 78(@entryPointOutput) BuiltIn Position
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypeInt 32 0
9: 8(int) Constant 2
10: TypeArray 7(fvec4) 9
11: TypeVector 8(int) 2
12(VI): TypeStruct 10 11(ivec2) 7(fvec4)
13: TypePointer Function 12(VI)
15: TypeInt 32 1
16: 15(int) Constant 2
17: TypePointer Input 7(fvec4)
18(m[1]): 17(ptr) Variable Input
20(m[0]): 17(ptr) Variable Input
23: TypePointer Input 11(ivec2)
24(coord): 23(ptr) Variable Input
25: 8(int) Constant 0
26: TypePointer Input 8(int)
32(d): 17(ptr) Variable Input
35(e): 17(ptr) Variable Input
38: TypePointer Function 7(fvec4)
40(VI): TypeStruct 10 11(ivec2) 7(fvec4)
41: TypePointer Output 40(VI)
42(@entryPointOutput): 41(ptr) Variable Output
43: 15(int) Constant 0
44: TypePointer Function 10
47: TypePointer Output 10
49: 15(int) Constant 1
50: TypePointer Function 11(ivec2)
53: TypePointer Output 11(ivec2)
57: TypePointer Output 7(fvec4)
60(b): 17(ptr) Variable Input
8: TypePointer Function 7(fvec4)
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 7(fvec4) 10
12: TypeVector 9(int) 2
13(VI): TypeStruct 11 12(ivec2) 7(fvec4)
14: TypePointer Function 13(VI)
15: TypeFunction 13(VI) 8(ptr) 14(ptr) 8(ptr)
22: TypeInt 32 1
23: 22(int) Constant 2
24: 22(int) Constant 0
25: 22(int) Constant 1
31: 9(int) Constant 0
32: TypePointer Function 9(int)
47: TypePointer Input 7(fvec4)
48(d): 47(ptr) Variable Input
51(m[0]): 47(ptr) Variable Input
54(m[1]): 47(ptr) Variable Input
57: TypePointer Input 12(ivec2)
58(coord): 57(ptr) Variable Input
60: TypePointer Function 12(ivec2)
62(b): 47(ptr) Variable Input
66(e): 47(ptr) Variable Input
76(VI): TypeStruct 11 12(ivec2) 7(fvec4)
77: TypePointer Output 76(VI)
78(@entryPointOutput): 77(ptr) Variable Output
79: TypePointer Function 11
82: TypePointer Output 11
86: TypePointer Output 12(ivec2)
90: TypePointer Output 7(fvec4)
4(main): 2 Function None 3
5: Label
14(local): 13(ptr) Variable Function
19: 7(fvec4) Load 18(m[1])
21: 7(fvec4) Load 20(m[0])
22: 7(fvec4) FAdd 19 21
27: 26(ptr) AccessChain 24(coord) 25
28: 8(int) Load 27
29: 6(float) ConvertUToF 28
30: 7(fvec4) CompositeConstruct 29 29 29 29
31: 7(fvec4) FAdd 22 30
33: 7(fvec4) Load 32(d)
34: 7(fvec4) FAdd 31 33
36: 7(fvec4) Load 35(e)
37: 7(fvec4) FAdd 34 36
39: 38(ptr) AccessChain 14(local) 16
Store 39 37
45: 44(ptr) AccessChain 14(local) 43
46: 10 Load 45
48: 47(ptr) AccessChain 42(@entryPointOutput) 43
Store 48 46
51: 50(ptr) AccessChain 14(local) 49
52: 11(ivec2) Load 51
54: 53(ptr) AccessChain 42(@entryPointOutput) 49
Store 54 52
55: 38(ptr) AccessChain 14(local) 16
56: 7(fvec4) Load 55
58: 57(ptr) AccessChain 42(@entryPointOutput) 16
Store 58 56
46(d): 8(ptr) Variable Function
50(vi): 14(ptr) Variable Function
65(e): 8(ptr) Variable Function
68(flattenTemp): 14(ptr) Variable Function
69(param): 8(ptr) Variable Function
71(param): 14(ptr) Variable Function
73(param): 8(ptr) Variable Function
49: 7(fvec4) Load 48(d)
Store 46(d) 49
52: 7(fvec4) Load 51(m[0])
53: 8(ptr) AccessChain 50(vi) 24 24
Store 53 52
55: 7(fvec4) Load 54(m[1])
56: 8(ptr) AccessChain 50(vi) 24 25
Store 56 55
59: 12(ivec2) Load 58(coord)
61: 60(ptr) AccessChain 50(vi) 25
Store 61 59
63: 7(fvec4) Load 62(b)
64: 8(ptr) AccessChain 50(vi) 23
Store 64 63
67: 7(fvec4) Load 66(e)
Store 65(e) 67
70: 7(fvec4) Load 46(d)
Store 69(param) 70
72: 13(VI) Load 50(vi)
Store 71(param) 72
74: 7(fvec4) Load 65(e)
Store 73(param) 74
75: 13(VI) FunctionCall 19(@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;) 69(param) 71(param) 73(param)
Store 68(flattenTemp) 75
80: 79(ptr) AccessChain 68(flattenTemp) 24
81: 11 Load 80
83: 82(ptr) AccessChain 78(@entryPointOutput) 24
Store 83 81
84: 60(ptr) AccessChain 68(flattenTemp) 25
85: 12(ivec2) Load 84
87: 86(ptr) AccessChain 78(@entryPointOutput) 25
Store 87 85
88: 8(ptr) AccessChain 68(flattenTemp) 23
89: 7(fvec4) Load 88
91: 90(ptr) AccessChain 78(@entryPointOutput) 23
Store 91 89
Return
FunctionEnd
19(@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;): 13(VI) Function None 15
16(d): 8(ptr) FunctionParameter
17(vi): 14(ptr) FunctionParameter
18(e): 8(ptr) FunctionParameter
20: Label
21(local): 14(ptr) Variable Function
26: 8(ptr) AccessChain 17(vi) 24 25
27: 7(fvec4) Load 26
28: 8(ptr) AccessChain 17(vi) 24 24
29: 7(fvec4) Load 28
30: 7(fvec4) FAdd 27 29
33: 32(ptr) AccessChain 17(vi) 25 31
34: 9(int) Load 33
35: 6(float) ConvertUToF 34
36: 7(fvec4) CompositeConstruct 35 35 35 35
37: 7(fvec4) FAdd 30 36
38: 7(fvec4) Load 16(d)
39: 7(fvec4) FAdd 37 38
40: 7(fvec4) Load 18(e)
41: 7(fvec4) FAdd 39 40
42: 8(ptr) AccessChain 21(local) 23
Store 42 41
43: 13(VI) Load 21(local)
ReturnValue 43
FunctionEnd