HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.

This commit is contained in:
John Kessenich
2016-09-16 03:05:12 -06:00
parent f8e494c18c
commit d21baed6bc
67 changed files with 4024 additions and 2886 deletions

View File

@@ -139,10 +139,20 @@ gl_FragCoord origin is upper left
0:58 1 (const int)
0:58 Constant:
0:58 1.000000
0:60 Sequence
0:60 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:60 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:60 Color: direct index for structure (temp 4-component vector of float)
0:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:60 Constant:
0:60 0 (const int)
0:60 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:60 Depth: direct index for structure (temp float FragDepth)
0:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:60 Constant:
0:60 1 (const int)
0:60 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -314,10 +324,20 @@ gl_FragCoord origin is upper left
0:58 1 (const int)
0:58 Constant:
0:58 1.000000
0:60 Sequence
0:60 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:60 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:60 Color: direct index for structure (temp 4-component vector of float)
0:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:60 Constant:
0:60 0 (const int)
0:60 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:60 Depth: direct index for structure (temp float FragDepth)
0:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:60 Constant:
0:60 1 (const int)
0:60 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -347,14 +367,14 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 181
// Id's are bound by 182
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 138 178 180
EntryPoint Fragment 4 "main" 138 142
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "r00"
@@ -380,21 +400,20 @@ gl_FragCoord origin is upper left
MemberName 127(PS_OUTPUT) 0 "Color"
MemberName 127(PS_OUTPUT) 1 "Depth"
Name 129 "psout"
Name 138 "@entryPointOutput"
Name 143 "g_tTex3df4"
Name 146 "g_tTex3di4"
Name 149 "g_tTex3du4"
Name 152 "g_tTex1df4a"
Name 155 "g_tTex1di4a"
Name 158 "g_tTex1du4a"
Name 161 "g_tTex2df4a"
Name 164 "g_tTex2di4a"
Name 167 "g_tTex2du4a"
Name 170 "g_tTexcdf4a"
Name 173 "g_tTexcdi4a"
Name 176 "g_tTexcdu4a"
Name 178 "Color"
Name 180 "Depth"
Name 138 "Color"
Name 142 "Depth"
Name 148 "g_tTex3df4"
Name 151 "g_tTex3di4"
Name 154 "g_tTex3du4"
Name 157 "g_tTex1df4a"
Name 160 "g_tTex1di4a"
Name 163 "g_tTex1du4a"
Name 166 "g_tTex2df4a"
Name 169 "g_tTex2di4a"
Name 172 "g_tTex2du4a"
Name 175 "g_tTexcdf4a"
Name 178 "g_tTexcdi4a"
Name 181 "g_tTexcdu4a"
Decorate 11(g_tTex1df4) DescriptorSet 0
Decorate 11(g_tTex1df4) Binding 0
Decorate 15(g_sSamp) DescriptorSet 0
@@ -408,20 +427,20 @@ gl_FragCoord origin is upper left
Decorate 105(g_tTexcdi4) DescriptorSet 0
Decorate 117(g_tTexcdu4) DescriptorSet 0
MemberDecorate 127(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 143(g_tTex3df4) DescriptorSet 0
Decorate 146(g_tTex3di4) DescriptorSet 0
Decorate 149(g_tTex3du4) DescriptorSet 0
Decorate 152(g_tTex1df4a) DescriptorSet 0
Decorate 155(g_tTex1di4a) DescriptorSet 0
Decorate 158(g_tTex1du4a) DescriptorSet 0
Decorate 161(g_tTex2df4a) DescriptorSet 0
Decorate 164(g_tTex2di4a) DescriptorSet 0
Decorate 167(g_tTex2du4a) DescriptorSet 0
Decorate 170(g_tTexcdf4a) DescriptorSet 0
Decorate 173(g_tTexcdi4a) DescriptorSet 0
Decorate 176(g_tTexcdu4a) DescriptorSet 0
Decorate 178(Color) Location 0
Decorate 180(Depth) BuiltIn FragDepth
Decorate 138(Color) Location 0
Decorate 142(Depth) BuiltIn FragDepth
Decorate 148(g_tTex3df4) DescriptorSet 0
Decorate 151(g_tTex3di4) DescriptorSet 0
Decorate 154(g_tTex3du4) DescriptorSet 0
Decorate 157(g_tTex1df4a) DescriptorSet 0
Decorate 160(g_tTex1di4a) DescriptorSet 0
Decorate 163(g_tTex1du4a) DescriptorSet 0
Decorate 166(g_tTex2df4a) DescriptorSet 0
Decorate 169(g_tTex2di4a) DescriptorSet 0
Decorate 172(g_tTex2du4a) DescriptorSet 0
Decorate 175(g_tTexcdf4a) DescriptorSet 0
Decorate 178(g_tTexcdi4a) DescriptorSet 0
Decorate 181(g_tTexcdu4a) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -492,48 +511,46 @@ gl_FragCoord origin is upper left
132: 126(fvec4) ConstantComposite 131 131 131 131
133: TypePointer Function 126(fvec4)
135: 25(int) Constant 1
137: TypePointer Output 127(PS_OUTPUT)
138(@entryPointOutput): 137(ptr) Variable Output
141: TypeImage 6(float) 3D sampled format:Unknown
142: TypePointer UniformConstant 141
143(g_tTex3df4): 142(ptr) Variable UniformConstant
144: TypeImage 25(int) 3D sampled format:Unknown
145: TypePointer UniformConstant 144
146(g_tTex3di4): 145(ptr) Variable UniformConstant
147: TypeImage 37(int) 3D sampled format:Unknown
148: TypePointer UniformConstant 147
149(g_tTex3du4): 148(ptr) Variable UniformConstant
150: TypeImage 6(float) 1D array sampled format:Unknown
151: TypePointer UniformConstant 150
152(g_tTex1df4a): 151(ptr) Variable UniformConstant
153: TypeImage 25(int) 1D array sampled format:Unknown
154: TypePointer UniformConstant 153
155(g_tTex1di4a): 154(ptr) Variable UniformConstant
156: TypeImage 37(int) 1D array sampled format:Unknown
157: TypePointer UniformConstant 156
158(g_tTex1du4a): 157(ptr) Variable UniformConstant
159: TypeImage 6(float) 2D array sampled format:Unknown
160: TypePointer UniformConstant 159
161(g_tTex2df4a): 160(ptr) Variable UniformConstant
162: TypeImage 25(int) 2D array sampled format:Unknown
163: TypePointer UniformConstant 162
164(g_tTex2di4a): 163(ptr) Variable UniformConstant
165: TypeImage 37(int) 2D array sampled format:Unknown
166: TypePointer UniformConstant 165
167(g_tTex2du4a): 166(ptr) Variable UniformConstant
168: TypeImage 6(float) Cube array sampled format:Unknown
169: TypePointer UniformConstant 168
170(g_tTexcdf4a): 169(ptr) Variable UniformConstant
171: TypeImage 25(int) Cube array sampled format:Unknown
172: TypePointer UniformConstant 171
173(g_tTexcdi4a): 172(ptr) Variable UniformConstant
174: TypeImage 37(int) Cube array sampled format:Unknown
175: TypePointer UniformConstant 174
176(g_tTexcdu4a): 175(ptr) Variable UniformConstant
177: TypePointer Output 126(fvec4)
178(Color): 177(ptr) Variable Output
179: TypePointer Output 6(float)
180(Depth): 179(ptr) Variable Output
137: TypePointer Output 126(fvec4)
138(Color): 137(ptr) Variable Output
141: TypePointer Output 6(float)
142(Depth): 141(ptr) Variable Output
146: TypeImage 6(float) 3D sampled format:Unknown
147: TypePointer UniformConstant 146
148(g_tTex3df4): 147(ptr) Variable UniformConstant
149: TypeImage 25(int) 3D sampled format:Unknown
150: TypePointer UniformConstant 149
151(g_tTex3di4): 150(ptr) Variable UniformConstant
152: TypeImage 37(int) 3D sampled format:Unknown
153: TypePointer UniformConstant 152
154(g_tTex3du4): 153(ptr) Variable UniformConstant
155: TypeImage 6(float) 1D array sampled format:Unknown
156: TypePointer UniformConstant 155
157(g_tTex1df4a): 156(ptr) Variable UniformConstant
158: TypeImage 25(int) 1D array sampled format:Unknown
159: TypePointer UniformConstant 158
160(g_tTex1di4a): 159(ptr) Variable UniformConstant
161: TypeImage 37(int) 1D array sampled format:Unknown
162: TypePointer UniformConstant 161
163(g_tTex1du4a): 162(ptr) Variable UniformConstant
164: TypeImage 6(float) 2D array sampled format:Unknown
165: TypePointer UniformConstant 164
166(g_tTex2df4a): 165(ptr) Variable UniformConstant
167: TypeImage 25(int) 2D array sampled format:Unknown
168: TypePointer UniformConstant 167
169(g_tTex2di4a): 168(ptr) Variable UniformConstant
170: TypeImage 37(int) 2D array sampled format:Unknown
171: TypePointer UniformConstant 170
172(g_tTex2du4a): 171(ptr) Variable UniformConstant
173: TypeImage 6(float) Cube array sampled format:Unknown
174: TypePointer UniformConstant 173
175(g_tTexcdf4a): 174(ptr) Variable UniformConstant
176: TypeImage 25(int) Cube array sampled format:Unknown
177: TypePointer UniformConstant 176
178(g_tTexcdi4a): 177(ptr) Variable UniformConstant
179: TypeImage 37(int) Cube array sampled format:Unknown
180: TypePointer UniformConstant 179
181(g_tTexcdu4a): 180(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
8(r00): 7(ptr) Variable Function
@@ -610,7 +627,11 @@ gl_FragCoord origin is upper left
Store 134 132
136: 7(ptr) AccessChain 129(psout) 135
Store 136 131
139:127(PS_OUTPUT) Load 129(psout)
Store 138(@entryPointOutput) 139
139: 133(ptr) AccessChain 129(psout) 130
140: 126(fvec4) Load 139
Store 138(Color) 140
143: 7(ptr) AccessChain 129(psout) 135
144: 6(float) Load 143
Store 142(Depth) 144
Return
FunctionEnd