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

@@ -169,10 +169,20 @@ gl_FragCoord origin is upper left
0:49 1 (const int)
0:49 Constant:
0:49 1.000000
0:51 Sequence
0:51 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:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:51 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:51 Color: direct index for structure (temp 4-component vector of float)
0:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:51 Constant:
0:51 0 (const int)
0:51 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:51 Depth: direct index for structure (temp float FragDepth)
0:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:51 Constant:
0:51 1 (const int)
0:51 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -367,10 +377,20 @@ gl_FragCoord origin is upper left
0:49 1 (const int)
0:49 Constant:
0:49 1.000000
0:51 Sequence
0:51 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:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:51 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:51 Color: direct index for structure (temp 4-component vector of float)
0:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:51 Constant:
0:51 0 (const int)
0:51 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:51 Depth: direct index for structure (temp float FragDepth)
0:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:51 Constant:
0:51 1 (const int)
0:51 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -393,13 +413,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 164
// Id's are bound by 165
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 155 161 163
EntryPoint Fragment 4 "main" 155 159
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@@ -431,11 +451,10 @@ gl_FragCoord origin is upper left
MemberName 144(PS_OUTPUT) 0 "Color"
MemberName 144(PS_OUTPUT) 1 "Depth"
Name 146 "psout"
Name 155 "@entryPointOutput"
Name 158 "g_sSamp2d"
Name 159 "g_tTex1df4a"
Name 161 "Color"
Name 163 "Depth"
Name 155 "Color"
Name 159 "Depth"
Name 163 "g_sSamp2d"
Name 164 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -452,11 +471,11 @@ gl_FragCoord origin is upper left
Decorate 129(g_tTexcdi4) DescriptorSet 0
Decorate 138(g_tTexcdu4) DescriptorSet 0
MemberDecorate 144(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 158(g_sSamp2d) DescriptorSet 0
Decorate 159(g_tTex1df4a) DescriptorSet 0
Decorate 159(g_tTex1df4a) Binding 1
Decorate 161(Color) Location 0
Decorate 163(Depth) BuiltIn FragDepth
Decorate 155(Color) Location 0
Decorate 159(Depth) BuiltIn FragDepth
Decorate 163(g_sSamp2d) DescriptorSet 0
Decorate 164(g_tTex1df4a) DescriptorSet 0
Decorate 164(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -544,14 +563,12 @@ gl_FragCoord origin is upper left
149: 7(fvec4) ConstantComposite 148 148 148 148
151: 23(int) Constant 1
152: TypePointer Function 6(float)
154: TypePointer Output 144(PS_OUTPUT)
155(@entryPointOutput): 154(ptr) Variable Output
158(g_sSamp2d): 15(ptr) Variable UniformConstant
159(g_tTex1df4a): 11(ptr) Variable UniformConstant
160: TypePointer Output 7(fvec4)
161(Color): 160(ptr) Variable Output
162: TypePointer Output 6(float)
163(Depth): 162(ptr) Variable Output
154: TypePointer Output 7(fvec4)
155(Color): 154(ptr) Variable Output
158: TypePointer Output 6(float)
159(Depth): 158(ptr) Variable Output
163(g_sSamp2d): 15(ptr) Variable UniformConstant
164(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -631,7 +648,11 @@ gl_FragCoord origin is upper left
Store 150 149
153: 152(ptr) AccessChain 146(psout) 151
Store 153 148
156:144(PS_OUTPUT) Load 146(psout)
Store 155(@entryPointOutput) 156
156: 8(ptr) AccessChain 146(psout) 147
157: 7(fvec4) Load 156
Store 155(Color) 157
160: 152(ptr) AccessChain 146(psout) 151
161: 6(float) Load 160
Store 159(Depth) 161
Return
FunctionEnd