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

@@ -7,13 +7,13 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 189
// Id's are bound by 190
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 180 186 188
EntryPoint Fragment 4 "main" 180 184
ExecutionMode 4 OriginUpperLeft
Decorate 41 DescriptorSet 0
Decorate 41 Binding 0
@@ -31,12 +31,12 @@ Linked fragment stage:
Decorate 156 DescriptorSet 0
Decorate 165 DescriptorSet 0
MemberDecorate 171 1 BuiltIn FragDepth
Decorate 182 DescriptorSet 0
Decorate 183 DescriptorSet 0
Decorate 184 DescriptorSet 0
Decorate 184 Binding 1
Decorate 186 Location 0
Decorate 188 BuiltIn FragDepth
Decorate 180 Location 0
Decorate 184 BuiltIn FragDepth
Decorate 187 DescriptorSet 0
Decorate 188 DescriptorSet 0
Decorate 189 DescriptorSet 0
Decorate 189 Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@@ -136,15 +136,13 @@ Linked fragment stage:
174: 35(float) Constant 1065353216
175: 36(fvec4) ConstantComposite 174 174 174 174
177: TypePointer Function 35(float)
179: TypePointer Output 171(struct)
179: TypePointer Output 36(fvec4)
180: 179(ptr) Variable Output
182: 44(ptr) Variable UniformConstant
183: 44(ptr) Variable UniformConstant
184: 40(ptr) Variable UniformConstant
185: TypePointer Output 36(fvec4)
186: 185(ptr) Variable Output
187: TypePointer Output 35(float)
188: 187(ptr) Variable Output
183: TypePointer Output 35(float)
184: 183(ptr) Variable Output
187: 44(ptr) Variable UniformConstant
188: 44(ptr) Variable UniformConstant
189: 40(ptr) Variable UniformConstant
4: 2 Function None 3
5: Label
9: 8(ptr) Variable Function
@@ -249,7 +247,11 @@ Linked fragment stage:
Store 176 175
178: 177(ptr) AccessChain 173 10
Store 178 174
181: 171(struct) Load 173
Store 180 181
181: 37(ptr) AccessChain 173 23
182: 36(fvec4) Load 181
Store 180 182
185: 177(ptr) AccessChain 173 10
186: 35(float) Load 185
Store 184 186
Return
FunctionEnd