
This commit adds support for copying nested hierarchical types of split types. E.g, a struct of a struct containing both user and builtin interstage IO variables. When copying split types, if any subtree does NOT contain builtin interstage IO, we can copy the whole subtree with one assignment, which saves a bunch of AST verbosity for memberwise copies of that subtree.
238 lines
14 KiB
Plaintext
Executable File
238 lines
14 KiB
Plaintext
Executable File
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 Parameters:
|
|
0:8 'd' (layout(location=0 ) 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:? 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)
|
|
0:11 '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:11 Constant:
|
|
0:11 2 (const int)
|
|
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: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 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 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:? 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:? '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:
|
|
|
|
|
|
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 Parameters:
|
|
0:8 'd' (layout(location=0 ) 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:? 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)
|
|
0:11 '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:11 Constant:
|
|
0:11 2 (const int)
|
|
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: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 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 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:? 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:? '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
|
|
|
|
Capability Shader
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Vertex 4 "main" 18 20 24 32 35 42 60
|
|
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
|
|
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
|
|
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
|
|
Return
|
|
FunctionEnd
|