HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -262,10 +262,20 @@ gl_FragCoord origin is upper left
|
||||
0:74 1 (const int)
|
||||
0:74 Constant:
|
||||
0:74 1.000000
|
||||
0:76 Sequence
|
||||
0:76 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:76 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:76 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:76 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:76 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:76 Constant:
|
||||
0:76 0 (const int)
|
||||
0:76 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:76 Depth: direct index for structure (temp float FragDepth)
|
||||
0:76 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:76 Constant:
|
||||
0:76 1 (const int)
|
||||
0:76 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -557,10 +567,20 @@ gl_FragCoord origin is upper left
|
||||
0:74 1 (const int)
|
||||
0:74 Constant:
|
||||
0:74 1.000000
|
||||
0:76 Sequence
|
||||
0:76 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:76 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:76 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:76 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:76 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:76 Constant:
|
||||
0:76 0 (const int)
|
||||
0:76 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:76 Depth: direct index for structure (temp float FragDepth)
|
||||
0:76 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:76 Constant:
|
||||
0:76 1 (const int)
|
||||
0:76 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -587,13 +607,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 236
|
||||
// Id's are bound by 237
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 205 233 235
|
||||
EntryPoint Fragment 4 "main" 205 209
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval00"
|
||||
@@ -633,19 +653,18 @@ gl_FragCoord origin is upper left
|
||||
MemberName 196(PS_OUTPUT) 0 "Color"
|
||||
MemberName 196(PS_OUTPUT) 1 "Depth"
|
||||
Name 198 "psout"
|
||||
Name 205 "@entryPointOutput"
|
||||
Name 208 "g_sSamp2d"
|
||||
Name 211 "g_tTex1df4a"
|
||||
Name 212 "g_tTex1df4"
|
||||
Name 215 "g_tTex1di4"
|
||||
Name 218 "g_tTex1du4"
|
||||
Name 221 "g_tTex3df4"
|
||||
Name 224 "g_tTex3di4"
|
||||
Name 227 "g_tTex3du4"
|
||||
Name 229 "c1"
|
||||
Name 231 "c4"
|
||||
Name 233 "Color"
|
||||
Name 235 "Depth"
|
||||
Name 205 "Color"
|
||||
Name 209 "Depth"
|
||||
Name 213 "g_sSamp2d"
|
||||
Name 216 "g_tTex1df4a"
|
||||
Name 217 "g_tTex1df4"
|
||||
Name 220 "g_tTex1di4"
|
||||
Name 223 "g_tTex1du4"
|
||||
Name 226 "g_tTex3df4"
|
||||
Name 229 "g_tTex3di4"
|
||||
Name 232 "g_tTex3du4"
|
||||
Name 234 "c1"
|
||||
Name 236 "c4"
|
||||
Decorate 12(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
@@ -655,18 +674,18 @@ gl_FragCoord origin is upper left
|
||||
Decorate 125(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 135(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 196(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 208(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 211(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 211(g_tTex1df4a) Binding 1
|
||||
Decorate 212(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 212(g_tTex1df4) Binding 0
|
||||
Decorate 215(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 218(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 221(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 224(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 227(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 233(Color) Location 0
|
||||
Decorate 235(Depth) BuiltIn FragDepth
|
||||
Decorate 205(Color) Location 0
|
||||
Decorate 209(Depth) BuiltIn FragDepth
|
||||
Decorate 213(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 216(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 216(g_tTex1df4a) Binding 1
|
||||
Decorate 217(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 217(g_tTex1df4) Binding 0
|
||||
Decorate 220(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 223(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 226(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 229(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 232(g_tTex3du4) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -720,36 +739,34 @@ gl_FragCoord origin is upper left
|
||||
199: 6(float) Constant 1065353216
|
||||
200: 7(fvec4) ConstantComposite 199 199 199 199
|
||||
202: TypePointer Function 6(float)
|
||||
204: TypePointer Output 196(PS_OUTPUT)
|
||||
205(@entryPointOutput): 204(ptr) Variable Output
|
||||
208(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
209: TypeImage 6(float) 1D sampled format:Unknown
|
||||
210: TypePointer UniformConstant 209
|
||||
211(g_tTex1df4a): 210(ptr) Variable UniformConstant
|
||||
212(g_tTex1df4): 210(ptr) Variable UniformConstant
|
||||
213: TypeImage 24(int) 1D sampled format:Unknown
|
||||
214: TypePointer UniformConstant 213
|
||||
215(g_tTex1di4): 214(ptr) Variable UniformConstant
|
||||
216: TypeImage 39(int) 1D sampled format:Unknown
|
||||
217: TypePointer UniformConstant 216
|
||||
218(g_tTex1du4): 217(ptr) Variable UniformConstant
|
||||
219: TypeImage 6(float) 3D sampled format:Unknown
|
||||
220: TypePointer UniformConstant 219
|
||||
221(g_tTex3df4): 220(ptr) Variable UniformConstant
|
||||
222: TypeImage 24(int) 3D sampled format:Unknown
|
||||
223: TypePointer UniformConstant 222
|
||||
224(g_tTex3di4): 223(ptr) Variable UniformConstant
|
||||
225: TypeImage 39(int) 3D sampled format:Unknown
|
||||
226: TypePointer UniformConstant 225
|
||||
227(g_tTex3du4): 226(ptr) Variable UniformConstant
|
||||
228: TypePointer UniformConstant 6(float)
|
||||
229(c1): 228(ptr) Variable UniformConstant
|
||||
230: TypePointer UniformConstant 7(fvec4)
|
||||
231(c4): 230(ptr) Variable UniformConstant
|
||||
232: TypePointer Output 7(fvec4)
|
||||
233(Color): 232(ptr) Variable Output
|
||||
234: TypePointer Output 6(float)
|
||||
235(Depth): 234(ptr) Variable Output
|
||||
204: TypePointer Output 7(fvec4)
|
||||
205(Color): 204(ptr) Variable Output
|
||||
208: TypePointer Output 6(float)
|
||||
209(Depth): 208(ptr) Variable Output
|
||||
213(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
214: TypeImage 6(float) 1D sampled format:Unknown
|
||||
215: TypePointer UniformConstant 214
|
||||
216(g_tTex1df4a): 215(ptr) Variable UniformConstant
|
||||
217(g_tTex1df4): 215(ptr) Variable UniformConstant
|
||||
218: TypeImage 24(int) 1D sampled format:Unknown
|
||||
219: TypePointer UniformConstant 218
|
||||
220(g_tTex1di4): 219(ptr) Variable UniformConstant
|
||||
221: TypeImage 39(int) 1D sampled format:Unknown
|
||||
222: TypePointer UniformConstant 221
|
||||
223(g_tTex1du4): 222(ptr) Variable UniformConstant
|
||||
224: TypeImage 6(float) 3D sampled format:Unknown
|
||||
225: TypePointer UniformConstant 224
|
||||
226(g_tTex3df4): 225(ptr) Variable UniformConstant
|
||||
227: TypeImage 24(int) 3D sampled format:Unknown
|
||||
228: TypePointer UniformConstant 227
|
||||
229(g_tTex3di4): 228(ptr) Variable UniformConstant
|
||||
230: TypeImage 39(int) 3D sampled format:Unknown
|
||||
231: TypePointer UniformConstant 230
|
||||
232(g_tTex3du4): 231(ptr) Variable UniformConstant
|
||||
233: TypePointer UniformConstant 6(float)
|
||||
234(c1): 233(ptr) Variable UniformConstant
|
||||
235: TypePointer UniformConstant 7(fvec4)
|
||||
236(c4): 235(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval00): 8(ptr) Variable Function
|
||||
@@ -925,7 +942,11 @@ gl_FragCoord origin is upper left
|
||||
Store 201 200
|
||||
203: 202(ptr) AccessChain 198(psout) 57
|
||||
Store 203 199
|
||||
206:196(PS_OUTPUT) Load 198(psout)
|
||||
Store 205(@entryPointOutput) 206
|
||||
206: 8(ptr) AccessChain 198(psout) 25
|
||||
207: 7(fvec4) Load 206
|
||||
Store 205(Color) 207
|
||||
210: 202(ptr) AccessChain 198(psout) 57
|
||||
211: 6(float) Load 210
|
||||
Store 209(Depth) 211
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user