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

@@ -121,10 +121,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)
@@ -267,10 +277,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)
@@ -289,14 +309,14 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 138
// Id's are bound by 139
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 130 135 137
EntryPoint Fragment 4 "main" 130 134
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@@ -322,10 +342,9 @@ gl_FragCoord origin is upper left
MemberName 120(PS_OUTPUT) 0 "Color"
MemberName 120(PS_OUTPUT) 1 "Depth"
Name 122 "psout"
Name 130 "@entryPointOutput"
Name 133 "g_tTex1df4a"
Name 135 "Color"
Name 137 "Depth"
Name 130 "Color"
Name 134 "Depth"
Name 138 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -339,10 +358,10 @@ gl_FragCoord origin is upper left
Decorate 100(g_tTexcdi4) DescriptorSet 0
Decorate 110(g_tTexcdu4) DescriptorSet 0
MemberDecorate 120(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 133(g_tTex1df4a) DescriptorSet 0
Decorate 133(g_tTex1df4a) Binding 1
Decorate 135(Color) Location 0
Decorate 137(Depth) BuiltIn FragDepth
Decorate 130(Color) Location 0
Decorate 134(Depth) BuiltIn FragDepth
Decorate 138(g_tTex1df4a) DescriptorSet 0
Decorate 138(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -420,13 +439,11 @@ gl_FragCoord origin is upper left
124: 7(fvec4) ConstantComposite 117 117 117 117
126: 25(int) Constant 1
127: TypePointer Function 6(float)
129: TypePointer Output 120(PS_OUTPUT)
130(@entryPointOutput): 129(ptr) Variable Output
133(g_tTex1df4a): 11(ptr) Variable UniformConstant
134: TypePointer Output 7(fvec4)
135(Color): 134(ptr) Variable Output
136: TypePointer Output 6(float)
137(Depth): 136(ptr) Variable Output
129: TypePointer Output 7(fvec4)
130(Color): 129(ptr) Variable Output
133: TypePointer Output 6(float)
134(Depth): 133(ptr) Variable Output
138(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -488,7 +505,11 @@ gl_FragCoord origin is upper left
Store 125 124
128: 127(ptr) AccessChain 122(psout) 126
Store 128 117
131:120(PS_OUTPUT) Load 122(psout)
Store 130(@entryPointOutput) 131
131: 8(ptr) AccessChain 122(psout) 123
132: 7(fvec4) Load 131
Store 130(Color) 132
135: 127(ptr) AccessChain 122(psout) 126
136: 6(float) Load 135
Store 134(Depth) 136
Return
FunctionEnd