HLSL: Build IO types bottom up, as parsed, and cache the original (IO).
Previously, this was done recursively, per object, and the nonIO version was cached. This reverses both those approaches.
This commit is contained in:
@@ -153,12 +153,12 @@ output primitive = triangle_strip
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 97
|
||||
// Id's are bound by 88
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 90
|
||||
EntryPoint Geometry 4 "main" 81
|
||||
ExecutionMode 4 InputPoints
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
@@ -173,26 +173,20 @@ output primitive = triangle_strip
|
||||
Name 17 "v"
|
||||
Name 18 "OutputStream"
|
||||
Name 21 "Out"
|
||||
Name 22 "PSInput"
|
||||
MemberName 22(PSInput) 0 "Pos"
|
||||
MemberName 22(PSInput) 1 "TexCoord"
|
||||
MemberName 22(PSInput) 2 "TerrainPos"
|
||||
MemberName 22(PSInput) 3 "VertexID"
|
||||
Name 47 "x"
|
||||
Name 56 "y"
|
||||
Name 64 "PSInput"
|
||||
MemberName 64(PSInput) 0 "Pos"
|
||||
MemberName 64(PSInput) 1 "TexCoord"
|
||||
MemberName 64(PSInput) 2 "TerrainPos"
|
||||
MemberName 64(PSInput) 3 "VertexID"
|
||||
Name 70 "Verts"
|
||||
Name 88 "v"
|
||||
Name 90 "v"
|
||||
Name 92 "OutputStream"
|
||||
Name 93 "param"
|
||||
Name 95 "param"
|
||||
MemberDecorate 22(PSInput) 0 BuiltIn Position
|
||||
Decorate 90(v) Location 0
|
||||
Name 30 "x"
|
||||
Name 41 "y"
|
||||
Name 49 "PSInput"
|
||||
MemberName 49(PSInput) 0 "Pos"
|
||||
MemberName 49(PSInput) 1 "TexCoord"
|
||||
MemberName 49(PSInput) 2 "TerrainPos"
|
||||
MemberName 49(PSInput) 3 "VertexID"
|
||||
Name 55 "Verts"
|
||||
Name 79 "v"
|
||||
Name 81 "v"
|
||||
Name 83 "OutputStream"
|
||||
Name 84 "param"
|
||||
Name 86 "param"
|
||||
Decorate 81(v) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
@@ -206,44 +200,43 @@ output primitive = triangle_strip
|
||||
14(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
||||
15: TypePointer Function 14(PSInput)
|
||||
16: TypeFunction 2 9(ptr) 15(ptr)
|
||||
22(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
||||
23: 10(float) Constant 0
|
||||
24: 11(fvec4) ConstantComposite 23 23 23 23
|
||||
25: 12(fvec2) ConstantComposite 23 23
|
||||
26: 13(fvec3) ConstantComposite 23 23 23
|
||||
27: 6(int) Constant 0
|
||||
28: 22(PSInput) ConstantComposite 24 25 26 27
|
||||
30: TypeInt 32 1
|
||||
31: 30(int) Constant 0
|
||||
32: TypePointer Function 11(fvec4)
|
||||
35: 30(int) Constant 1
|
||||
36: TypePointer Function 12(fvec2)
|
||||
39: 30(int) Constant 2
|
||||
40: TypePointer Function 13(fvec3)
|
||||
43: 30(int) Constant 3
|
||||
44: TypePointer Function 6(int)
|
||||
46: TypePointer Function 30(int)
|
||||
54: TypeBool
|
||||
64(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
||||
65: 6(int) Constant 3
|
||||
66: TypeArray 64(PSInput) 65
|
||||
67: 6(int) Constant 2
|
||||
68: TypeArray 66 67
|
||||
69: TypePointer Function 68
|
||||
74: TypePointer Function 64(PSInput)
|
||||
89: TypePointer Input 8
|
||||
90(v): 89(ptr) Variable Input
|
||||
22: 10(float) Constant 0
|
||||
23: 11(fvec4) ConstantComposite 22 22 22 22
|
||||
24: 12(fvec2) ConstantComposite 22 22
|
||||
25: 13(fvec3) ConstantComposite 22 22 22
|
||||
26: 6(int) Constant 0
|
||||
27: 14(PSInput) ConstantComposite 23 24 25 26
|
||||
28: TypeInt 32 1
|
||||
29: TypePointer Function 28(int)
|
||||
31: 28(int) Constant 0
|
||||
38: 28(int) Constant 2
|
||||
39: TypeBool
|
||||
49(PSInput): TypeStruct 11(fvec4) 12(fvec2) 13(fvec3) 6(int)
|
||||
50: 6(int) Constant 3
|
||||
51: TypeArray 49(PSInput) 50
|
||||
52: 6(int) Constant 2
|
||||
53: TypeArray 51 52
|
||||
54: TypePointer Function 53
|
||||
59: TypePointer Function 49(PSInput)
|
||||
62: TypePointer Function 11(fvec4)
|
||||
65: 28(int) Constant 1
|
||||
66: TypePointer Function 12(fvec2)
|
||||
69: TypePointer Function 13(fvec3)
|
||||
72: 28(int) Constant 3
|
||||
73: TypePointer Function 6(int)
|
||||
80: TypePointer Input 8
|
||||
81(v): 80(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
88(v): 9(ptr) Variable Function
|
||||
92(OutputStream): 15(ptr) Variable Function
|
||||
93(param): 9(ptr) Variable Function
|
||||
95(param): 15(ptr) Variable Function
|
||||
91: 8 Load 90(v)
|
||||
Store 88(v) 91
|
||||
94: 8 Load 88(v)
|
||||
Store 93(param) 94
|
||||
96: 2 FunctionCall 19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;) 93(param) 95(param)
|
||||
79(v): 9(ptr) Variable Function
|
||||
83(OutputStream): 15(ptr) Variable Function
|
||||
84(param): 9(ptr) Variable Function
|
||||
86(param): 15(ptr) Variable Function
|
||||
82: 8 Load 81(v)
|
||||
Store 79(v) 82
|
||||
85: 8 Load 79(v)
|
||||
Store 84(param) 85
|
||||
87: 2 FunctionCall 19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;) 84(param) 86(param)
|
||||
Return
|
||||
FunctionEnd
|
||||
19(@main(u1[1];struct-PSInput-vf4-vf2-vf3-u11;): 2 Function None 16
|
||||
@@ -251,70 +244,59 @@ output primitive = triangle_strip
|
||||
18(OutputStream): 15(ptr) FunctionParameter
|
||||
20: Label
|
||||
21(Out): 15(ptr) Variable Function
|
||||
47(x): 46(ptr) Variable Function
|
||||
56(y): 46(ptr) Variable Function
|
||||
70(Verts): 69(ptr) Variable Function
|
||||
29: 11(fvec4) CompositeExtract 28 0
|
||||
33: 32(ptr) AccessChain 21(Out) 31
|
||||
Store 33 29
|
||||
34: 12(fvec2) CompositeExtract 28 1
|
||||
37: 36(ptr) AccessChain 21(Out) 35
|
||||
Store 37 34
|
||||
38: 13(fvec3) CompositeExtract 28 2
|
||||
41: 40(ptr) AccessChain 21(Out) 39
|
||||
Store 41 38
|
||||
42: 6(int) CompositeExtract 28 3
|
||||
45: 44(ptr) AccessChain 21(Out) 43
|
||||
Store 45 42
|
||||
Store 47(x) 31
|
||||
Branch 48
|
||||
48: Label
|
||||
LoopMerge 50 51 None
|
||||
Branch 52
|
||||
52: Label
|
||||
53: 30(int) Load 47(x)
|
||||
55: 54(bool) SLessThan 53 39
|
||||
BranchConditional 55 49 50
|
||||
49: Label
|
||||
Store 56(y) 31
|
||||
Branch 57
|
||||
57: Label
|
||||
LoopMerge 59 60 None
|
||||
Branch 61
|
||||
61: Label
|
||||
62: 30(int) Load 56(y)
|
||||
63: 54(bool) SLessThan 62 39
|
||||
BranchConditional 63 58 59
|
||||
58: Label
|
||||
71: 30(int) Load 47(x)
|
||||
72: 30(int) Load 56(y)
|
||||
73: 14(PSInput) Load 21(Out)
|
||||
75: 74(ptr) AccessChain 70(Verts) 71 72
|
||||
76: 11(fvec4) CompositeExtract 73 0
|
||||
77: 32(ptr) AccessChain 75 31
|
||||
Store 77 76
|
||||
78: 12(fvec2) CompositeExtract 73 1
|
||||
79: 36(ptr) AccessChain 75 35
|
||||
Store 79 78
|
||||
80: 13(fvec3) CompositeExtract 73 2
|
||||
81: 40(ptr) AccessChain 75 39
|
||||
Store 81 80
|
||||
82: 6(int) CompositeExtract 73 3
|
||||
83: 44(ptr) AccessChain 75 43
|
||||
Store 83 82
|
||||
Branch 60
|
||||
60: Label
|
||||
84: 30(int) Load 56(y)
|
||||
85: 30(int) IAdd 84 35
|
||||
Store 56(y) 85
|
||||
Branch 57
|
||||
59: Label
|
||||
Branch 51
|
||||
51: Label
|
||||
86: 30(int) Load 47(x)
|
||||
87: 30(int) IAdd 86 35
|
||||
Store 47(x) 87
|
||||
Branch 48
|
||||
50: Label
|
||||
30(x): 29(ptr) Variable Function
|
||||
41(y): 29(ptr) Variable Function
|
||||
55(Verts): 54(ptr) Variable Function
|
||||
Store 21(Out) 27
|
||||
Store 30(x) 31
|
||||
Branch 32
|
||||
32: Label
|
||||
LoopMerge 34 35 None
|
||||
Branch 36
|
||||
36: Label
|
||||
37: 28(int) Load 30(x)
|
||||
40: 39(bool) SLessThan 37 38
|
||||
BranchConditional 40 33 34
|
||||
33: Label
|
||||
Store 41(y) 31
|
||||
Branch 42
|
||||
42: Label
|
||||
LoopMerge 44 45 None
|
||||
Branch 46
|
||||
46: Label
|
||||
47: 28(int) Load 41(y)
|
||||
48: 39(bool) SLessThan 47 38
|
||||
BranchConditional 48 43 44
|
||||
43: Label
|
||||
56: 28(int) Load 30(x)
|
||||
57: 28(int) Load 41(y)
|
||||
58: 14(PSInput) Load 21(Out)
|
||||
60: 59(ptr) AccessChain 55(Verts) 56 57
|
||||
61: 11(fvec4) CompositeExtract 58 0
|
||||
63: 62(ptr) AccessChain 60 31
|
||||
Store 63 61
|
||||
64: 12(fvec2) CompositeExtract 58 1
|
||||
67: 66(ptr) AccessChain 60 65
|
||||
Store 67 64
|
||||
68: 13(fvec3) CompositeExtract 58 2
|
||||
70: 69(ptr) AccessChain 60 38
|
||||
Store 70 68
|
||||
71: 6(int) CompositeExtract 58 3
|
||||
74: 73(ptr) AccessChain 60 72
|
||||
Store 74 71
|
||||
Branch 45
|
||||
45: Label
|
||||
75: 28(int) Load 41(y)
|
||||
76: 28(int) IAdd 75 65
|
||||
Store 41(y) 76
|
||||
Branch 42
|
||||
44: Label
|
||||
Branch 35
|
||||
35: Label
|
||||
77: 28(int) Load 30(x)
|
||||
78: 28(int) IAdd 77 65
|
||||
Store 30(x) 78
|
||||
Branch 32
|
||||
34: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user