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:40 1 (const int)
0:40 Constant:
0:40 1.000000
0:42 Sequence
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:42 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:42 Color: direct index for structure (temp 4-component vector of float)
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:42 Constant:
0:42 0 (const int)
0:42 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:42 Depth: direct index for structure (temp float FragDepth)
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:42 Constant:
0:42 1 (const int)
0:42 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -303,10 +313,20 @@ gl_FragCoord origin is upper left
0:40 1 (const int)
0:40 Constant:
0:40 1.000000
0:42 Sequence
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:42 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:42 Color: direct index for structure (temp 4-component vector of float)
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:42 Constant:
0:42 0 (const int)
0:42 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:42 Depth: direct index for structure (temp float FragDepth)
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:42 Constant:
0:42 1 (const int)
0:42 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -325,14 +345,14 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 139
// Id's are bound by 140
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 131 136 138
EntryPoint Fragment 4 "main" 131 135
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@@ -358,10 +378,9 @@ gl_FragCoord origin is upper left
MemberName 121(PS_OUTPUT) 0 "Color"
MemberName 121(PS_OUTPUT) 1 "Depth"
Name 123 "psout"
Name 131 "@entryPointOutput"
Name 134 "g_tTex1df4"
Name 136 "Color"
Name 138 "Depth"
Name 131 "Color"
Name 135 "Depth"
Name 139 "g_tTex1df4"
Decorate 12(g_tTex1df4a) DescriptorSet 0
Decorate 12(g_tTex1df4a) Binding 1
Decorate 16(g_sSamp) DescriptorSet 0
@@ -375,10 +394,10 @@ gl_FragCoord origin is upper left
Decorate 101(g_tTexcdi4a) DescriptorSet 0
Decorate 111(g_tTexcdu4a) DescriptorSet 0
MemberDecorate 121(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 134(g_tTex1df4) DescriptorSet 0
Decorate 134(g_tTex1df4) Binding 0
Decorate 136(Color) Location 0
Decorate 138(Depth) BuiltIn FragDepth
Decorate 131(Color) Location 0
Decorate 135(Depth) BuiltIn FragDepth
Decorate 139(g_tTex1df4) DescriptorSet 0
Decorate 139(g_tTex1df4) Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -457,13 +476,11 @@ gl_FragCoord origin is upper left
125: 7(fvec4) ConstantComposite 118 118 118 118
127: 26(int) Constant 1
128: TypePointer Function 6(float)
130: TypePointer Output 121(PS_OUTPUT)
131(@entryPointOutput): 130(ptr) Variable Output
134(g_tTex1df4): 11(ptr) Variable UniformConstant
135: TypePointer Output 7(fvec4)
136(Color): 135(ptr) Variable Output
137: TypePointer Output 6(float)
138(Depth): 137(ptr) Variable Output
130: TypePointer Output 7(fvec4)
131(Color): 130(ptr) Variable Output
134: TypePointer Output 6(float)
135(Depth): 134(ptr) Variable Output
139(g_tTex1df4): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -525,7 +542,11 @@ gl_FragCoord origin is upper left
Store 126 125
129: 128(ptr) AccessChain 123(psout) 127
Store 129 118
132:121(PS_OUTPUT) Load 123(psout)
Store 131(@entryPointOutput) 132
132: 8(ptr) AccessChain 123(psout) 124
133: 7(fvec4) Load 132
Store 131(Color) 133
136: 128(ptr) AccessChain 123(psout) 127
137: 6(float) Load 136
Store 135(Depth) 137
Return
FunctionEnd