Flatten all interface variables (#2217)
Specifically, add flattening of arrayed io for geometry and tesselation shaders. Previously some interface structs just had builtins split out which caused some interfaces to not be exactly the same as that of flattened adjacent stages, affecting validation and correctness. This obviates builtin splitting. That will be removed in a followup commit. It was left in for this commit to better exhibit the functional changes that were made. Fixes #1660.
This commit is contained in:
@@ -148,11 +148,8 @@ output primitive = triangle_strip
|
||||
0:24 0 (const int)
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 tc: direct index for structure ( temp 2-component vector of float)
|
||||
0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc})
|
||||
0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 direct index (layout( location=0) in 2-component vector of float)
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 move second child to first child ( temp 4-component vector of float)
|
||||
@@ -175,13 +172,10 @@ output primitive = triangle_strip
|
||||
0:24 1 (const int)
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 tc: direct index for structure ( temp 2-component vector of float)
|
||||
0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc})
|
||||
0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 direct index (layout( location=0) in 2-component vector of float)
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 1 (const int)
|
||||
0:24 move second child to first child ( temp 4-component vector of float)
|
||||
0:24 pos: direct index for structure ( temp 4-component vector of float)
|
||||
0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
|
||||
@@ -202,19 +196,16 @@ output primitive = triangle_strip
|
||||
0:24 2 (const int)
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 tc: direct index for structure ( temp 2-component vector of float)
|
||||
0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc})
|
||||
0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:24 Constant:
|
||||
0:24 2 (const int)
|
||||
0:24 direct index (layout( location=0) in 2-component vector of float)
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 2 (const int)
|
||||
0:24 Function Call: @main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111; ( temp void)
|
||||
0:? 'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
|
||||
0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
|
||||
0:? Linker Objects
|
||||
0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position)
|
||||
0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:? 'ts.pos' ( out 4-component vector of float Position)
|
||||
0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
|
||||
0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
|
||||
@@ -374,11 +365,8 @@ output primitive = triangle_strip
|
||||
0:24 0 (const int)
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 tc: direct index for structure ( temp 2-component vector of float)
|
||||
0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc})
|
||||
0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 direct index (layout( location=0) in 2-component vector of float)
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 move second child to first child ( temp 4-component vector of float)
|
||||
@@ -401,13 +389,10 @@ output primitive = triangle_strip
|
||||
0:24 1 (const int)
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 tc: direct index for structure ( temp 2-component vector of float)
|
||||
0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc})
|
||||
0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 direct index (layout( location=0) in 2-component vector of float)
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 1 (const int)
|
||||
0:24 move second child to first child ( temp 4-component vector of float)
|
||||
0:24 pos: direct index for structure ( temp 4-component vector of float)
|
||||
0:24 direct index ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
|
||||
@@ -428,19 +413,16 @@ output primitive = triangle_strip
|
||||
0:24 2 (const int)
|
||||
0:24 Constant:
|
||||
0:24 1 (const int)
|
||||
0:24 tc: direct index for structure ( temp 2-component vector of float)
|
||||
0:24 direct index (layout( location=0) in structure{ temp 2-component vector of float tc})
|
||||
0:24 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:24 Constant:
|
||||
0:24 2 (const int)
|
||||
0:24 direct index (layout( location=0) in 2-component vector of float)
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:24 Constant:
|
||||
0:24 0 (const int)
|
||||
0:24 2 (const int)
|
||||
0:24 Function Call: @main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111; ( temp void)
|
||||
0:? 'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 2-component vector of float tc})
|
||||
0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io})
|
||||
0:? Linker Objects
|
||||
0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position)
|
||||
0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc})
|
||||
0:? 'tin.tc' (layout( location=0) in 3-element array of 2-component vector of float)
|
||||
0:? 'ts.pos' ( out 4-component vector of float Position)
|
||||
0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float)
|
||||
0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float)
|
||||
@@ -449,12 +431,12 @@ output primitive = triangle_strip
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 100
|
||||
// Id's are bound by 99
|
||||
|
||||
Capability Geometry
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Geometry 4 "main" 48 52 56 59 63 69 77
|
||||
EntryPoint Geometry 4 "main" 48 52 56 59 63 69 76
|
||||
ExecutionMode 4 Triangles
|
||||
ExecutionMode 4 Invocations 1
|
||||
ExecutionMode 4 OutputTriangleStrip
|
||||
@@ -481,19 +463,17 @@ output primitive = triangle_strip
|
||||
Name 63 "ts.contains_no_builtin_io.m1"
|
||||
Name 66 "tin"
|
||||
Name 69 "tin.pos"
|
||||
Name 74 "PS_IN"
|
||||
MemberName 74(PS_IN) 0 "tc"
|
||||
Name 77 "tin"
|
||||
Name 94 "ts"
|
||||
Name 95 "param"
|
||||
Name 97 "param"
|
||||
Name 76 "tin.tc"
|
||||
Name 93 "ts"
|
||||
Name 94 "param"
|
||||
Name 96 "param"
|
||||
Decorate 48(ts.pos) BuiltIn Position
|
||||
Decorate 52(ts.psIn.tc) Location 0
|
||||
Decorate 56(ts.contains_no_builtin_io.m0_array[0]) Location 1
|
||||
Decorate 59(ts.contains_no_builtin_io.m0_array[1]) Location 2
|
||||
Decorate 63(ts.contains_no_builtin_io.m1) Location 3
|
||||
Decorate 69(tin.pos) BuiltIn Position
|
||||
Decorate 77(tin) Location 0
|
||||
Decorate 76(tin.tc) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -540,46 +520,45 @@ output primitive = triangle_strip
|
||||
68: TypePointer Input 67
|
||||
69(tin.pos): 68(ptr) Variable Input
|
||||
70: TypePointer Input 7(fvec4)
|
||||
74(PS_IN): TypeStruct 8(fvec2)
|
||||
75: TypeArray 74(PS_IN) 11
|
||||
76: TypePointer Input 75
|
||||
77(tin): 76(ptr) Variable Input
|
||||
78: TypePointer Input 8(fvec2)
|
||||
74: TypeArray 8(fvec2) 11
|
||||
75: TypePointer Input 74
|
||||
76(tin.tc): 75(ptr) Variable Input
|
||||
77: TypePointer Input 8(fvec2)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
66(tin): 13(ptr) Variable Function
|
||||
94(ts): 19(ptr) Variable Function
|
||||
95(param): 13(ptr) Variable Function
|
||||
97(param): 19(ptr) Variable Function
|
||||
93(ts): 19(ptr) Variable Function
|
||||
94(param): 13(ptr) Variable Function
|
||||
96(param): 19(ptr) Variable Function
|
||||
71: 70(ptr) AccessChain 69(tin.pos) 26
|
||||
72: 7(fvec4) Load 71
|
||||
73: 32(ptr) AccessChain 66(tin) 26 26
|
||||
Store 73 72
|
||||
79: 78(ptr) AccessChain 77(tin) 26 26
|
||||
80: 8(fvec2) Load 79
|
||||
81: 38(ptr) AccessChain 66(tin) 26 34
|
||||
Store 81 80
|
||||
82: 70(ptr) AccessChain 69(tin.pos) 34
|
||||
83: 7(fvec4) Load 82
|
||||
84: 32(ptr) AccessChain 66(tin) 34 26
|
||||
Store 84 83
|
||||
85: 78(ptr) AccessChain 77(tin) 34 26
|
||||
86: 8(fvec2) Load 85
|
||||
87: 38(ptr) AccessChain 66(tin) 34 34
|
||||
Store 87 86
|
||||
88: 70(ptr) AccessChain 69(tin.pos) 44
|
||||
89: 7(fvec4) Load 88
|
||||
90: 32(ptr) AccessChain 66(tin) 44 26
|
||||
Store 90 89
|
||||
91: 78(ptr) AccessChain 77(tin) 44 26
|
||||
92: 8(fvec2) Load 91
|
||||
93: 38(ptr) AccessChain 66(tin) 44 34
|
||||
Store 93 92
|
||||
96: 12 Load 66(tin)
|
||||
Store 95(param) 96
|
||||
98: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 95(param) 97(param)
|
||||
99: 18(GS_OUT) Load 97(param)
|
||||
Store 94(ts) 99
|
||||
78: 77(ptr) AccessChain 76(tin.tc) 26
|
||||
79: 8(fvec2) Load 78
|
||||
80: 38(ptr) AccessChain 66(tin) 26 34
|
||||
Store 80 79
|
||||
81: 70(ptr) AccessChain 69(tin.pos) 34
|
||||
82: 7(fvec4) Load 81
|
||||
83: 32(ptr) AccessChain 66(tin) 34 26
|
||||
Store 83 82
|
||||
84: 77(ptr) AccessChain 76(tin.tc) 34
|
||||
85: 8(fvec2) Load 84
|
||||
86: 38(ptr) AccessChain 66(tin) 34 34
|
||||
Store 86 85
|
||||
87: 70(ptr) AccessChain 69(tin.pos) 44
|
||||
88: 7(fvec4) Load 87
|
||||
89: 32(ptr) AccessChain 66(tin) 44 26
|
||||
Store 89 88
|
||||
90: 77(ptr) AccessChain 76(tin.tc) 44
|
||||
91: 8(fvec2) Load 90
|
||||
92: 38(ptr) AccessChain 66(tin) 44 34
|
||||
Store 92 91
|
||||
95: 12 Load 66(tin)
|
||||
Store 94(param) 95
|
||||
97: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 94(param) 96(param)
|
||||
98: 18(GS_OUT) Load 96(param)
|
||||
Store 93(ts) 98
|
||||
Return
|
||||
FunctionEnd
|
||||
23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;): 2 Function None 20
|
||||
|
||||
Reference in New Issue
Block a user