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

@ -175,10 +175,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)
@ -375,10 +385,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)
@ -397,14 +417,14 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 132
// Id's are bound by 133
Capability Shader
Capability Sampled1D
Capability SampledCubeArray
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 124 129 131
EntryPoint Fragment 4 "main" 124 128
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@ -430,10 +450,9 @@ gl_FragCoord origin is upper left
MemberName 113(PS_OUTPUT) 0 "Color"
MemberName 113(PS_OUTPUT) 1 "Depth"
Name 115 "psout"
Name 124 "@entryPointOutput"
Name 127 "g_tTex1df4a"
Name 129 "Color"
Name 131 "Depth"
Name 124 "Color"
Name 128 "Depth"
Name 132 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@ -447,10 +466,10 @@ gl_FragCoord origin is upper left
Decorate 98(g_tTexcdi4) DescriptorSet 0
Decorate 107(g_tTexcdu4) DescriptorSet 0
MemberDecorate 113(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 127(g_tTex1df4a) DescriptorSet 0
Decorate 127(g_tTex1df4a) Binding 1
Decorate 129(Color) Location 0
Decorate 131(Depth) BuiltIn FragDepth
Decorate 124(Color) Location 0
Decorate 128(Depth) BuiltIn FragDepth
Decorate 132(g_tTex1df4a) DescriptorSet 0
Decorate 132(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -522,13 +541,11 @@ gl_FragCoord origin is upper left
118: 7(fvec4) ConstantComposite 117 117 117 117
120: 27(int) Constant 1
121: TypePointer Function 6(float)
123: TypePointer Output 113(PS_OUTPUT)
124(@entryPointOutput): 123(ptr) Variable Output
127(g_tTex1df4a): 11(ptr) Variable UniformConstant
128: TypePointer Output 7(fvec4)
129(Color): 128(ptr) Variable Output
130: TypePointer Output 6(float)
131(Depth): 130(ptr) Variable Output
123: TypePointer Output 7(fvec4)
124(Color): 123(ptr) Variable Output
127: TypePointer Output 6(float)
128(Depth): 127(ptr) Variable Output
132(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@ -590,7 +607,11 @@ gl_FragCoord origin is upper left
Store 119 118
122: 121(ptr) AccessChain 115(psout) 120
Store 122 117
125:113(PS_OUTPUT) Load 115(psout)
Store 124(@entryPointOutput) 125
125: 8(ptr) AccessChain 115(psout) 116
126: 7(fvec4) Load 125
Store 124(Color) 126
129: 121(ptr) AccessChain 115(psout) 120
130: 6(float) Load 129
Store 128(Depth) 130
Return
FunctionEnd