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:
@@ -25,19 +25,69 @@ vertex spacing = equal_spacing
|
||||
0:26 Function Definition: main( ( temp void)
|
||||
0:26 Function Parameters:
|
||||
0:? Sequence
|
||||
0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Sequence
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 1 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 1 (const int)
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 2 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 2 (const int)
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 3 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 3 (const int)
|
||||
0:26 move second child to first child ( temp uint)
|
||||
0:? 'm_cpid' ( temp uint)
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'm_cpid' ( temp uint)
|
||||
0:26 Sequence
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 indirect index (layout( location=0) out 3-component vector of float)
|
||||
0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float)
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'm_cpid' ( temp uint)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:? Barrier ( temp void)
|
||||
0:? Test condition and select ( temp void)
|
||||
0:? Condition
|
||||
@@ -103,8 +153,8 @@ vertex spacing = equal_spacing
|
||||
0:38 Branch: Return with expression
|
||||
0:38 'output' ( temp structure{ temp 2-element array of float edges})
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:? 'pid' ( in uint PrimitiveID)
|
||||
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
|
||||
@@ -139,19 +189,69 @@ vertex spacing = equal_spacing
|
||||
0:26 Function Definition: main( ( temp void)
|
||||
0:26 Function Parameters:
|
||||
0:? Sequence
|
||||
0:26 move second child to first child ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Sequence
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 1 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 1 (const int)
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 2 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 2 (const int)
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 direct index ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:26 Constant:
|
||||
0:26 3 (const int)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 direct index (layout( location=0) in 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:26 Constant:
|
||||
0:26 3 (const int)
|
||||
0:26 move second child to first child ( temp uint)
|
||||
0:? 'm_cpid' ( temp uint)
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint})
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'm_cpid' ( temp uint)
|
||||
0:26 Sequence
|
||||
0:26 move second child to first child ( temp 3-component vector of float)
|
||||
0:26 indirect index (layout( location=0) out 3-component vector of float)
|
||||
0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float)
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:26 cpoint: direct index for structure ( temp 3-component vector of float)
|
||||
0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'm_cpid' ( temp uint)
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:? Barrier ( temp void)
|
||||
0:? Test condition and select ( temp void)
|
||||
0:? Condition
|
||||
@@ -217,20 +317,20 @@ vertex spacing = equal_spacing
|
||||
0:38 Branch: Return with expression
|
||||
0:38 'output' ( temp structure{ temp 2-element array of float edges})
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint})
|
||||
0:? '@entryPointOutput.cpoint' (layout( location=0) out 4-element array of 3-component vector of float)
|
||||
0:? 'ip.cpoint' (layout( location=0) in 4-element array of 3-component vector of float)
|
||||
0:? 'm_cpid' ( in uint InvocationID)
|
||||
0:? 'pid' ( in uint PrimitiveID)
|
||||
0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80008
|
||||
// Id's are bound by 89
|
||||
// Id's are bound by 104
|
||||
|
||||
Capability Tessellation
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint TessellationControl 4 "main" 40 44 48 65 71
|
||||
EntryPoint TessellationControl 4 "main" 41 60 63 81 87
|
||||
ExecutionMode 4 OutputVertices 4
|
||||
ExecutionMode 4 Isolines
|
||||
ExecutionMode 4 SpacingEqual
|
||||
@@ -249,23 +349,23 @@ vertex spacing = equal_spacing
|
||||
Name 24 "pid"
|
||||
Name 28 "output"
|
||||
Name 38 "ip"
|
||||
Name 40 "ip"
|
||||
Name 42 "m_cpid"
|
||||
Name 44 "m_cpid"
|
||||
Name 48 "@entryPointOutput"
|
||||
Name 50 "param"
|
||||
Name 52 "param"
|
||||
Name 64 "@patchConstantResult"
|
||||
Name 65 "pid"
|
||||
Name 66 "param"
|
||||
Name 71 "@patchConstantOutput.edges"
|
||||
Name 81 "output"
|
||||
Decorate 40(ip) Location 0
|
||||
Decorate 44(m_cpid) BuiltIn InvocationId
|
||||
Decorate 48(@entryPointOutput) Location 0
|
||||
Decorate 65(pid) BuiltIn PrimitiveId
|
||||
Decorate 71(@patchConstantOutput.edges) Patch
|
||||
Decorate 71(@patchConstantOutput.edges) BuiltIn TessLevelOuter
|
||||
Name 41 "ip.cpoint"
|
||||
Name 58 "m_cpid"
|
||||
Name 60 "m_cpid"
|
||||
Name 63 "@entryPointOutput.cpoint"
|
||||
Name 65 "param"
|
||||
Name 67 "param"
|
||||
Name 80 "@patchConstantResult"
|
||||
Name 81 "pid"
|
||||
Name 82 "param"
|
||||
Name 87 "@patchConstantOutput.edges"
|
||||
Name 96 "output"
|
||||
Decorate 41(ip.cpoint) Location 0
|
||||
Decorate 60(m_cpid) BuiltIn InvocationId
|
||||
Decorate 63(@entryPointOutput.cpoint) Location 0
|
||||
Decorate 81(pid) BuiltIn PrimitiveId
|
||||
Decorate 87(@patchConstantOutput.edges) Patch
|
||||
Decorate 87(@patchConstantOutput.edges) BuiltIn TessLevelOuter
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -286,66 +386,84 @@ vertex spacing = equal_spacing
|
||||
29: TypeInt 32 1
|
||||
30: 29(int) Constant 0
|
||||
31: TypePointer Function 7(fvec3)
|
||||
39: TypePointer Input 11
|
||||
40(ip): 39(ptr) Variable Input
|
||||
43: TypePointer Input 9(int)
|
||||
44(m_cpid): 43(ptr) Variable Input
|
||||
46: TypeArray 14(HS_OUT) 10
|
||||
47: TypePointer Output 46
|
||||
48(@entryPointOutput): 47(ptr) Variable Output
|
||||
55: TypePointer Output 14(HS_OUT)
|
||||
57: 9(int) Constant 0
|
||||
59: TypeBool
|
||||
63: TypePointer Function 22(HS_CONSTANT_OUT)
|
||||
65(pid): 43(ptr) Variable Input
|
||||
69: TypeArray 6(float) 10
|
||||
70: TypePointer Output 69
|
||||
71(@patchConstantOutput.edges): 70(ptr) Variable Output
|
||||
72: TypePointer Function 6(float)
|
||||
75: TypePointer Output 6(float)
|
||||
77: 29(int) Constant 1
|
||||
82: 6(float) Constant 1073741824
|
||||
84: 6(float) Constant 1090519040
|
||||
39: TypeArray 7(fvec3) 10
|
||||
40: TypePointer Input 39
|
||||
41(ip.cpoint): 40(ptr) Variable Input
|
||||
42: TypePointer Input 7(fvec3)
|
||||
46: 29(int) Constant 1
|
||||
50: 29(int) Constant 2
|
||||
54: 29(int) Constant 3
|
||||
59: TypePointer Input 9(int)
|
||||
60(m_cpid): 59(ptr) Variable Input
|
||||
62: TypePointer Output 39
|
||||
63(@entryPointOutput.cpoint): 62(ptr) Variable Output
|
||||
71: TypePointer Output 7(fvec3)
|
||||
73: 9(int) Constant 0
|
||||
75: TypeBool
|
||||
79: TypePointer Function 22(HS_CONSTANT_OUT)
|
||||
81(pid): 59(ptr) Variable Input
|
||||
85: TypeArray 6(float) 10
|
||||
86: TypePointer Output 85
|
||||
87(@patchConstantOutput.edges): 86(ptr) Variable Output
|
||||
88: TypePointer Function 6(float)
|
||||
91: TypePointer Output 6(float)
|
||||
97: 6(float) Constant 1073741824
|
||||
99: 6(float) Constant 1090519040
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
38(ip): 12(ptr) Variable Function
|
||||
42(m_cpid): 13(ptr) Variable Function
|
||||
50(param): 12(ptr) Variable Function
|
||||
52(param): 13(ptr) Variable Function
|
||||
64(@patchConstantResult): 63(ptr) Variable Function
|
||||
66(param): 13(ptr) Variable Function
|
||||
41: 11 Load 40(ip)
|
||||
Store 38(ip) 41
|
||||
45: 9(int) Load 44(m_cpid)
|
||||
Store 42(m_cpid) 45
|
||||
49: 9(int) Load 44(m_cpid)
|
||||
51: 11 Load 38(ip)
|
||||
Store 50(param) 51
|
||||
53: 9(int) Load 42(m_cpid)
|
||||
Store 52(param) 53
|
||||
54: 14(HS_OUT) FunctionCall 18(@main(struct-VS_OUT-vf31[4];u1;) 50(param) 52(param)
|
||||
56: 55(ptr) AccessChain 48(@entryPointOutput) 49
|
||||
Store 56 54
|
||||
ControlBarrier 20 10 57
|
||||
58: 9(int) Load 44(m_cpid)
|
||||
60: 59(bool) IEqual 58 30
|
||||
SelectionMerge 62 None
|
||||
BranchConditional 60 61 62
|
||||
61: Label
|
||||
67: 9(int) Load 65(pid)
|
||||
Store 66(param) 67
|
||||
68:22(HS_CONSTANT_OUT) FunctionCall 25(PCF(u1;) 66(param)
|
||||
Store 64(@patchConstantResult) 68
|
||||
73: 72(ptr) AccessChain 64(@patchConstantResult) 30 30
|
||||
74: 6(float) Load 73
|
||||
76: 75(ptr) AccessChain 71(@patchConstantOutput.edges) 30
|
||||
Store 76 74
|
||||
78: 72(ptr) AccessChain 64(@patchConstantResult) 30 77
|
||||
79: 6(float) Load 78
|
||||
80: 75(ptr) AccessChain 71(@patchConstantOutput.edges) 77
|
||||
Store 80 79
|
||||
Branch 62
|
||||
62: Label
|
||||
58(m_cpid): 13(ptr) Variable Function
|
||||
65(param): 12(ptr) Variable Function
|
||||
67(param): 13(ptr) Variable Function
|
||||
80(@patchConstantResult): 79(ptr) Variable Function
|
||||
82(param): 13(ptr) Variable Function
|
||||
43: 42(ptr) AccessChain 41(ip.cpoint) 30
|
||||
44: 7(fvec3) Load 43
|
||||
45: 31(ptr) AccessChain 38(ip) 30 30
|
||||
Store 45 44
|
||||
47: 42(ptr) AccessChain 41(ip.cpoint) 46
|
||||
48: 7(fvec3) Load 47
|
||||
49: 31(ptr) AccessChain 38(ip) 46 30
|
||||
Store 49 48
|
||||
51: 42(ptr) AccessChain 41(ip.cpoint) 50
|
||||
52: 7(fvec3) Load 51
|
||||
53: 31(ptr) AccessChain 38(ip) 50 30
|
||||
Store 53 52
|
||||
55: 42(ptr) AccessChain 41(ip.cpoint) 54
|
||||
56: 7(fvec3) Load 55
|
||||
57: 31(ptr) AccessChain 38(ip) 54 30
|
||||
Store 57 56
|
||||
61: 9(int) Load 60(m_cpid)
|
||||
Store 58(m_cpid) 61
|
||||
64: 9(int) Load 60(m_cpid)
|
||||
66: 11 Load 38(ip)
|
||||
Store 65(param) 66
|
||||
68: 9(int) Load 58(m_cpid)
|
||||
Store 67(param) 68
|
||||
69: 14(HS_OUT) FunctionCall 18(@main(struct-VS_OUT-vf31[4];u1;) 65(param) 67(param)
|
||||
70: 7(fvec3) CompositeExtract 69 0
|
||||
72: 71(ptr) AccessChain 63(@entryPointOutput.cpoint) 64
|
||||
Store 72 70
|
||||
ControlBarrier 20 10 73
|
||||
74: 9(int) Load 60(m_cpid)
|
||||
76: 75(bool) IEqual 74 30
|
||||
SelectionMerge 78 None
|
||||
BranchConditional 76 77 78
|
||||
77: Label
|
||||
83: 9(int) Load 81(pid)
|
||||
Store 82(param) 83
|
||||
84:22(HS_CONSTANT_OUT) FunctionCall 25(PCF(u1;) 82(param)
|
||||
Store 80(@patchConstantResult) 84
|
||||
89: 88(ptr) AccessChain 80(@patchConstantResult) 30 30
|
||||
90: 6(float) Load 89
|
||||
92: 91(ptr) AccessChain 87(@patchConstantOutput.edges) 30
|
||||
Store 92 90
|
||||
93: 88(ptr) AccessChain 80(@patchConstantResult) 30 46
|
||||
94: 6(float) Load 93
|
||||
95: 91(ptr) AccessChain 87(@patchConstantOutput.edges) 46
|
||||
Store 95 94
|
||||
Branch 78
|
||||
78: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
18(@main(struct-VS_OUT-vf31[4];u1;): 14(HS_OUT) Function None 15
|
||||
@@ -363,11 +481,11 @@ vertex spacing = equal_spacing
|
||||
25(PCF(u1;):22(HS_CONSTANT_OUT) Function None 23
|
||||
24(pid): 13(ptr) FunctionParameter
|
||||
26: Label
|
||||
81(output): 63(ptr) Variable Function
|
||||
83: 72(ptr) AccessChain 81(output) 30 30
|
||||
Store 83 82
|
||||
85: 72(ptr) AccessChain 81(output) 30 77
|
||||
Store 85 84
|
||||
86:22(HS_CONSTANT_OUT) Load 81(output)
|
||||
ReturnValue 86
|
||||
96(output): 79(ptr) Variable Function
|
||||
98: 88(ptr) AccessChain 96(output) 30 30
|
||||
Store 98 97
|
||||
100: 88(ptr) AccessChain 96(output) 30 46
|
||||
Store 100 99
|
||||
101:22(HS_CONSTANT_OUT) Load 96(output)
|
||||
ReturnValue 101
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user