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:48 1 (const int)
0:48 Constant:
0:48 1.000000
0:50 Sequence
0:50 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:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:50 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:50 Color: direct index for structure (temp 4-component vector of float)
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:50 Constant:
0:50 0 (const int)
0:50 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:50 Depth: direct index for structure (temp float FragDepth)
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:50 Constant:
0:50 1 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -366,10 +376,20 @@ gl_FragCoord origin is upper left
0:48 1 (const int)
0:48 Constant:
0:48 1.000000
0:50 Sequence
0:50 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:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:50 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:50 Color: direct index for structure (temp 4-component vector of float)
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:50 Constant:
0:50 0 (const int)
0:50 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:50 Depth: direct index for structure (temp float FragDepth)
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:50 Constant:
0:50 1 (const int)
0:50 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -391,13 +411,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 162
// Id's are bound by 163
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 154 159 161
EntryPoint Fragment 4 "main" 154 158
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@@ -429,10 +449,9 @@ gl_FragCoord origin is upper left
MemberName 143(PS_OUTPUT) 0 "Color"
MemberName 143(PS_OUTPUT) 1 "Depth"
Name 145 "psout"
Name 154 "@entryPointOutput"
Name 157 "g_tTex1df4a"
Name 159 "Color"
Name 161 "Depth"
Name 154 "Color"
Name 158 "Depth"
Name 162 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -449,10 +468,10 @@ gl_FragCoord origin is upper left
Decorate 128(g_tTexcdi4) DescriptorSet 0
Decorate 137(g_tTexcdu4) DescriptorSet 0
MemberDecorate 143(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 157(g_tTex1df4a) DescriptorSet 0
Decorate 157(g_tTex1df4a) Binding 1
Decorate 159(Color) Location 0
Decorate 161(Depth) BuiltIn FragDepth
Decorate 154(Color) Location 0
Decorate 158(Depth) BuiltIn FragDepth
Decorate 162(g_tTex1df4a) DescriptorSet 0
Decorate 162(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -539,13 +558,11 @@ gl_FragCoord origin is upper left
148: 7(fvec4) ConstantComposite 147 147 147 147
150: 23(int) Constant 1
151: TypePointer Function 6(float)
153: TypePointer Output 143(PS_OUTPUT)
154(@entryPointOutput): 153(ptr) Variable Output
157(g_tTex1df4a): 11(ptr) Variable UniformConstant
158: TypePointer Output 7(fvec4)
159(Color): 158(ptr) Variable Output
160: TypePointer Output 6(float)
161(Depth): 160(ptr) Variable Output
153: TypePointer Output 7(fvec4)
154(Color): 153(ptr) Variable Output
157: TypePointer Output 6(float)
158(Depth): 157(ptr) Variable Output
162(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -625,7 +642,11 @@ gl_FragCoord origin is upper left
Store 149 148
152: 151(ptr) AccessChain 145(psout) 150
Store 152 147
155:143(PS_OUTPUT) Load 145(psout)
Store 154(@entryPointOutput) 155
155: 8(ptr) AccessChain 145(psout) 146
156: 7(fvec4) Load 155
Store 154(Color) 156
159: 151(ptr) AccessChain 145(psout) 150
160: 6(float) Load 159
Store 158(Depth) 160
Return
FunctionEnd