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

@ -157,10 +157,20 @@ gl_FragCoord origin is upper left
0:46 1 (const int)
0:46 Constant:
0:46 1.000000
0:48 Sequence
0:48 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:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:48 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:48 Color: direct index for structure (temp 4-component vector of float)
0:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:48 Constant:
0:48 0 (const int)
0:48 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:48 Depth: direct index for structure (temp float FragDepth)
0:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:48 Constant:
0:48 1 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@ -342,10 +352,20 @@ gl_FragCoord origin is upper left
0:46 1 (const int)
0:46 Constant:
0:46 1.000000
0:48 Sequence
0:48 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:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:48 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:48 Color: direct index for structure (temp 4-component vector of float)
0:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:48 Constant:
0:48 0 (const int)
0:48 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:48 Depth: direct index for structure (temp float FragDepth)
0:48 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:48 Constant:
0:48 1 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@ -367,13 +387,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 154
// Id's are bound by 155
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 137 151 153
EntryPoint Fragment 4 "main" 137 141
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@ -399,13 +419,12 @@ gl_FragCoord origin is upper left
MemberName 128(PS_OUTPUT) 0 "Color"
MemberName 128(PS_OUTPUT) 1 "Depth"
Name 130 "psout"
Name 137 "@entryPointOutput"
Name 140 "g_tTex1df4a"
Name 143 "g_tTexcdf4"
Name 146 "g_tTexcdi4"
Name 149 "g_tTexcdu4"
Name 151 "Color"
Name 153 "Depth"
Name 137 "Color"
Name 141 "Depth"
Name 145 "g_tTex1df4a"
Name 148 "g_tTexcdf4"
Name 151 "g_tTexcdi4"
Name 154 "g_tTexcdu4"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@ -419,13 +438,13 @@ gl_FragCoord origin is upper left
Decorate 106(g_tTex3di4) DescriptorSet 0
Decorate 117(g_tTex3du4) DescriptorSet 0
MemberDecorate 128(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 140(g_tTex1df4a) DescriptorSet 0
Decorate 140(g_tTex1df4a) Binding 1
Decorate 143(g_tTexcdf4) DescriptorSet 0
Decorate 146(g_tTexcdi4) DescriptorSet 0
Decorate 149(g_tTexcdu4) DescriptorSet 0
Decorate 151(Color) Location 0
Decorate 153(Depth) BuiltIn FragDepth
Decorate 137(Color) Location 0
Decorate 141(Depth) BuiltIn FragDepth
Decorate 145(g_tTex1df4a) DescriptorSet 0
Decorate 145(g_tTex1df4a) Binding 1
Decorate 148(g_tTexcdf4) DescriptorSet 0
Decorate 151(g_tTexcdi4) DescriptorSet 0
Decorate 154(g_tTexcdu4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -510,22 +529,20 @@ gl_FragCoord origin is upper left
131: 6(float) Constant 1065353216
132: 7(fvec4) ConstantComposite 131 131 131 131
134: TypePointer Function 6(float)
136: TypePointer Output 128(PS_OUTPUT)
137(@entryPointOutput): 136(ptr) Variable Output
140(g_tTex1df4a): 11(ptr) Variable UniformConstant
141: TypeImage 6(float) Cube sampled format:Unknown
142: TypePointer UniformConstant 141
143(g_tTexcdf4): 142(ptr) Variable UniformConstant
144: TypeImage 22(int) Cube sampled format:Unknown
145: TypePointer UniformConstant 144
146(g_tTexcdi4): 145(ptr) Variable UniformConstant
147: TypeImage 37(int) Cube sampled format:Unknown
148: TypePointer UniformConstant 147
149(g_tTexcdu4): 148(ptr) Variable UniformConstant
150: TypePointer Output 7(fvec4)
151(Color): 150(ptr) Variable Output
152: TypePointer Output 6(float)
153(Depth): 152(ptr) Variable Output
136: TypePointer Output 7(fvec4)
137(Color): 136(ptr) Variable Output
140: TypePointer Output 6(float)
141(Depth): 140(ptr) Variable Output
145(g_tTex1df4a): 11(ptr) Variable UniformConstant
146: TypeImage 6(float) Cube sampled format:Unknown
147: TypePointer UniformConstant 146
148(g_tTexcdf4): 147(ptr) Variable UniformConstant
149: TypeImage 22(int) Cube sampled format:Unknown
150: TypePointer UniformConstant 149
151(g_tTexcdi4): 150(ptr) Variable UniformConstant
152: TypeImage 37(int) Cube sampled format:Unknown
153: TypePointer UniformConstant 152
154(g_tTexcdu4): 153(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@ -587,7 +604,11 @@ gl_FragCoord origin is upper left
Store 133 132
135: 134(ptr) AccessChain 130(psout) 23
Store 135 131
138:128(PS_OUTPUT) Load 130(psout)
Store 137(@entryPointOutput) 138
138: 8(ptr) AccessChain 130(psout) 61
139: 7(fvec4) Load 138
Store 137(Color) 139
142: 134(ptr) AccessChain 130(psout) 23
143: 6(float) Load 142
Store 141(Depth) 143
Return
FunctionEnd