
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
322 lines
16 KiB
Plaintext
322 lines
16 KiB
Plaintext
hlsl.struct.split.array.geom
|
|
Shader version: 450
|
|
invocations = -1
|
|
max_vertices = 4
|
|
input primitive = points
|
|
output primitive = triangle_strip
|
|
0:? Sequence
|
|
0:13 Function Definition: @main(u1[1];struct-PSInput-vf4-vf2-vf3-u11; (temp void)
|
|
0:13 Function Parameters:
|
|
0:13 'v' (in 1-element array of uint)
|
|
0:13 'OutputStream' (out structure{temp 4-component vector of float Position Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:? Sequence
|
|
0:16 Sequence
|
|
0:16 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:16 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:16 Constant:
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0 (const uint)
|
|
0:18 Sequence
|
|
0:18 move second child to first child (temp int)
|
|
0:18 'x' (temp int)
|
|
0:18 Constant:
|
|
0:18 0 (const int)
|
|
0:18 Loop with condition tested first
|
|
0:18 Loop Condition
|
|
0:18 Compare Less Than (temp bool)
|
|
0:18 'x' (temp int)
|
|
0:18 Constant:
|
|
0:18 2 (const int)
|
|
0:18 Loop Body
|
|
0:19 Sequence
|
|
0:19 move second child to first child (temp int)
|
|
0:19 'y' (temp int)
|
|
0:19 Constant:
|
|
0:19 0 (const int)
|
|
0:19 Loop with condition tested first
|
|
0:19 Loop Condition
|
|
0:19 Compare Less Than (temp bool)
|
|
0:19 'y' (temp int)
|
|
0:19 Constant:
|
|
0:19 2 (const int)
|
|
0:19 Loop Body
|
|
0:20 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 indirect index (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 indirect index (temp 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 'Verts' (temp 2-element array of 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 'x' (temp int)
|
|
0:20 'y' (temp int)
|
|
0:20 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:19 Loop Terminal Expression
|
|
0:19 Pre-Increment (temp int)
|
|
0:19 'y' (temp int)
|
|
0:18 Loop Terminal Expression
|
|
0:18 Pre-Increment (temp int)
|
|
0:18 'x' (temp int)
|
|
0:13 Function Definition: main( (temp void)
|
|
0:13 Function Parameters:
|
|
0:? Sequence
|
|
0:13 move second child to first child (temp 1-element array of uint)
|
|
0:? 'v' (temp 1-element array of uint)
|
|
0:? 'v' (layout(location=0 ) in 1-element array of uint)
|
|
0:13 Function Call: @main(u1[1];struct-PSInput-vf4-vf2-vf3-u11; (temp void)
|
|
0:? 'v' (temp 1-element array of uint)
|
|
0:? 'OutputStream' (temp structure{temp 4-component vector of float Position Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:? Linker Objects
|
|
0:? 'v' (layout(location=0 ) in 1-element array of uint)
|
|
|
|
|
|
Linked geometry stage:
|
|
|
|
|
|
Shader version: 450
|
|
invocations = 1
|
|
max_vertices = 4
|
|
input primitive = points
|
|
output primitive = triangle_strip
|
|
0:? Sequence
|
|
0:13 Function Definition: @main(u1[1];struct-PSInput-vf4-vf2-vf3-u11; (temp void)
|
|
0:13 Function Parameters:
|
|
0:13 'v' (in 1-element array of uint)
|
|
0:13 'OutputStream' (out structure{temp 4-component vector of float Position Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:? Sequence
|
|
0:16 Sequence
|
|
0:16 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:16 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:16 Constant:
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0.000000
|
|
0:16 0 (const uint)
|
|
0:18 Sequence
|
|
0:18 move second child to first child (temp int)
|
|
0:18 'x' (temp int)
|
|
0:18 Constant:
|
|
0:18 0 (const int)
|
|
0:18 Loop with condition tested first
|
|
0:18 Loop Condition
|
|
0:18 Compare Less Than (temp bool)
|
|
0:18 'x' (temp int)
|
|
0:18 Constant:
|
|
0:18 2 (const int)
|
|
0:18 Loop Body
|
|
0:19 Sequence
|
|
0:19 move second child to first child (temp int)
|
|
0:19 'y' (temp int)
|
|
0:19 Constant:
|
|
0:19 0 (const int)
|
|
0:19 Loop with condition tested first
|
|
0:19 Loop Condition
|
|
0:19 Compare Less Than (temp bool)
|
|
0:19 'y' (temp int)
|
|
0:19 Constant:
|
|
0:19 2 (const int)
|
|
0:19 Loop Body
|
|
0:20 move second child to first child (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 indirect index (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 indirect index (temp 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 'Verts' (temp 2-element array of 3-element array of structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:20 'x' (temp int)
|
|
0:20 'y' (temp int)
|
|
0:20 'Out' (temp structure{temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:19 Loop Terminal Expression
|
|
0:19 Pre-Increment (temp int)
|
|
0:19 'y' (temp int)
|
|
0:18 Loop Terminal Expression
|
|
0:18 Pre-Increment (temp int)
|
|
0:18 'x' (temp int)
|
|
0:13 Function Definition: main( (temp void)
|
|
0:13 Function Parameters:
|
|
0:? Sequence
|
|
0:13 move second child to first child (temp 1-element array of uint)
|
|
0:? 'v' (temp 1-element array of uint)
|
|
0:? 'v' (layout(location=0 ) in 1-element array of uint)
|
|
0:13 Function Call: @main(u1[1];struct-PSInput-vf4-vf2-vf3-u11; (temp void)
|
|
0:? 'v' (temp 1-element array of uint)
|
|
0:? 'OutputStream' (temp structure{temp 4-component vector of float Position Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID})
|
|
0:? Linker Objects
|
|
0:? 'v' (layout(location=0 ) in 1-element array of uint)
|
|
|
|
// Module Version 10000
|
|
// Generated by (magic number): 80001
|
|
// Id's are bound by 98
|
|
|
|
Capability Geometry
|
|
1: ExtInstImport "GLSL.std.450"
|
|
MemoryModel Logical GLSL450
|
|
EntryPoint Geometry 4 "main" 91
|
|
ExecutionMode 4 InputPoints
|
|
ExecutionMode 4 Invocations 1
|
|
ExecutionMode 4 OutputTriangleStrip
|
|
ExecutionMode 4 OutputVertices 4
|
|
Name 4 "main"
|
|
Name 14 "PSInput"
|
|
MemberName 14(PSInput) 0 "Pos"
|
|
MemberName 14(PSInput) 1 "TexCoord"
|
|
MemberName 14(PSInput) 2 "TerrainPos"
|
|
MemberName 14(PSInput) 3 "VertexID"
|
|
Name 19 "@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;"
|
|
Name 17 "v"
|
|
Name 18 "OutputStream"
|
|
Name 21 "PSInput"
|
|
MemberName 21(PSInput) 0 "Pos"
|
|
MemberName 21(PSInput) 1 "TexCoord"
|
|
MemberName 21(PSInput) 2 "TerrainPos"
|
|
MemberName 21(PSInput) 3 "VertexID"
|
|
Name 23 "Out"
|
|
Name 48 "x"
|
|
Name 57 "y"
|
|
Name 65 "PSInput"
|
|
MemberName 65(PSInput) 0 "Pos"
|
|
MemberName 65(PSInput) 1 "TexCoord"
|
|
MemberName 65(PSInput) 2 "TerrainPos"
|
|
MemberName 65(PSInput) 3 "VertexID"
|
|
Name 71 "Verts"
|
|
Name 89 "v"
|
|
Name 91 "v"
|
|
Name 93 "OutputStream"
|
|
Name 94 "param"
|
|
Name 96 "param"
|
|
MemberDecorate 14(PSInput) 0 BuiltIn Position
|
|
Decorate 91(v) Location 0
|
|
2: TypeVoid
|
|
3: TypeFunction 2
|
|
6: TypeInt 32 0
|
|
7: 6(int) Constant 1
|
|
8: TypeArray 6(int) 7
|
|
9: TypePointer Function 8
|
|
10: TypeFloat 32
|
|
11: TypeVector 10(float) 4
|
|
12: TypeVector 10(float) 2
|
|
13: TypeVector 10(float) 3
|
|
14(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
|
15: TypePointer Function 14(PSInput)
|
|
16: TypeFunction 2 9(ptr) 15(ptr)
|
|
21(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
|
22: TypePointer Function 21(PSInput)
|
|
24: 10(float) Constant 0
|
|
25: 11(fvec4) ConstantComposite 24 24 24 24
|
|
26: 12(fvec2) ConstantComposite 24 24
|
|
27: 13(fvec3) ConstantComposite 24 24 24
|
|
28: 6(int) Constant 0
|
|
29: 14(PSInput) ConstantComposite 25 26 27 28
|
|
31: TypeInt 32 1
|
|
32: 31(int) Constant 0
|
|
33: TypePointer Function 11(fvec4)
|
|
36: 31(int) Constant 1
|
|
37: TypePointer Function 12(fvec2)
|
|
40: 31(int) Constant 2
|
|
41: TypePointer Function 13(fvec3)
|
|
44: 31(int) Constant 3
|
|
45: TypePointer Function 6(int)
|
|
47: TypePointer Function 31(int)
|
|
55: TypeBool
|
|
65(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
|
66: 6(int) Constant 3
|
|
67: TypeArray 65(PSInput) 66
|
|
68: 6(int) Constant 2
|
|
69: TypeArray 67 68
|
|
70: TypePointer Function 69
|
|
75: TypePointer Function 65(PSInput)
|
|
90: TypePointer Input 8
|
|
91(v): 90(ptr) Variable Input
|
|
4(main): 2 Function None 3
|
|
5: Label
|
|
89(v): 9(ptr) Variable Function
|
|
93(OutputStream): 15(ptr) Variable Function
|
|
94(param): 9(ptr) Variable Function
|
|
96(param): 15(ptr) Variable Function
|
|
92: 8 Load 91(v)
|
|
Store 89(v) 92
|
|
95: 8 Load 89(v)
|
|
Store 94(param) 95
|
|
97: 2 FunctionCall 19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;) 94(param) 96(param)
|
|
Return
|
|
FunctionEnd
|
|
19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;): 2 Function None 16
|
|
17(v): 9(ptr) FunctionParameter
|
|
18(OutputStream): 15(ptr) FunctionParameter
|
|
20: Label
|
|
23(Out): 22(ptr) Variable Function
|
|
48(x): 47(ptr) Variable Function
|
|
57(y): 47(ptr) Variable Function
|
|
71(Verts): 70(ptr) Variable Function
|
|
30: 11(fvec4) CompositeExtract 29 0
|
|
34: 33(ptr) AccessChain 23(Out) 32
|
|
Store 34 30
|
|
35: 12(fvec2) CompositeExtract 29 1
|
|
38: 37(ptr) AccessChain 23(Out) 36
|
|
Store 38 35
|
|
39: 13(fvec3) CompositeExtract 29 2
|
|
42: 41(ptr) AccessChain 23(Out) 40
|
|
Store 42 39
|
|
43: 6(int) CompositeExtract 29 3
|
|
46: 45(ptr) AccessChain 23(Out) 44
|
|
Store 46 43
|
|
Store 48(x) 32
|
|
Branch 49
|
|
49: Label
|
|
LoopMerge 51 52 None
|
|
Branch 53
|
|
53: Label
|
|
54: 31(int) Load 48(x)
|
|
56: 55(bool) SLessThan 54 40
|
|
BranchConditional 56 50 51
|
|
50: Label
|
|
Store 57(y) 32
|
|
Branch 58
|
|
58: Label
|
|
LoopMerge 60 61 None
|
|
Branch 62
|
|
62: Label
|
|
63: 31(int) Load 57(y)
|
|
64: 55(bool) SLessThan 63 40
|
|
BranchConditional 64 59 60
|
|
59: Label
|
|
72: 31(int) Load 48(x)
|
|
73: 31(int) Load 57(y)
|
|
74: 21(PSInput) Load 23(Out)
|
|
76: 75(ptr) AccessChain 71(Verts) 72 73
|
|
77: 11(fvec4) CompositeExtract 74 0
|
|
78: 33(ptr) AccessChain 76 32
|
|
Store 78 77
|
|
79: 12(fvec2) CompositeExtract 74 1
|
|
80: 37(ptr) AccessChain 76 36
|
|
Store 80 79
|
|
81: 13(fvec3) CompositeExtract 74 2
|
|
82: 41(ptr) AccessChain 76 40
|
|
Store 82 81
|
|
83: 6(int) CompositeExtract 74 3
|
|
84: 45(ptr) AccessChain 76 44
|
|
Store 84 83
|
|
Branch 61
|
|
61: Label
|
|
85: 31(int) Load 57(y)
|
|
86: 31(int) IAdd 85 36
|
|
Store 57(y) 86
|
|
Branch 58
|
|
60: Label
|
|
Branch 52
|
|
52: Label
|
|
87: 31(int) Load 48(x)
|
|
88: 31(int) IAdd 87 36
|
|
Store 48(x) 88
|
|
Branch 49
|
|
51: Label
|
|
Return
|
|
FunctionEnd
|