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

@@ -161,10 +161,14 @@ Shader version: 450
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:48 Sequence
0:48 move second child to first child (temp structure{temp 4-component vector of float Position Pos})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Position Pos})
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:? Sequence
0:? Sequence
0:48 move second child to first child (temp 4-component vector of float)
0:? 'Pos' (out 4-component vector of float Position)
0:48 Pos: direct index for structure (temp 4-component vector of float Position)
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:48 Constant:
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -349,10 +353,14 @@ Shader version: 450
0:? 0.000000
0:? 0.000000
0:? 0.000000
0:48 Sequence
0:48 move second child to first child (temp structure{temp 4-component vector of float Position Pos})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Position Pos})
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:? Sequence
0:? Sequence
0:48 move second child to first child (temp 4-component vector of float)
0:? 'Pos' (out 4-component vector of float Position)
0:48 Pos: direct index for structure (temp 4-component vector of float Position)
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:48 Constant:
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -373,13 +381,13 @@ Shader version: 450
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 158
// Id's are bound by 157
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 152 157
EntryPoint Vertex 4 "main" 152
Name 4 "main"
Name 9 "txval10"
Name 12 "g_tTex1df4"
@@ -409,9 +417,8 @@ Shader version: 450
Name 144 "VS_OUTPUT"
MemberName 144(VS_OUTPUT) 0 "Pos"
Name 146 "vsout"
Name 152 "@entryPointOutput"
Name 155 "g_tTex1df4a"
Name 157 "Pos"
Name 152 "Pos"
Name 156 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -428,9 +435,9 @@ Shader version: 450
Decorate 129(g_tTexcdi4) DescriptorSet 0
Decorate 138(g_tTexcdu4) DescriptorSet 0
MemberDecorate 144(VS_OUTPUT) 0 BuiltIn Position
Decorate 155(g_tTex1df4a) DescriptorSet 0
Decorate 155(g_tTex1df4a) Binding 1
Decorate 157(Pos) BuiltIn Position
Decorate 152(Pos) BuiltIn Position
Decorate 156(g_tTex1df4a) DescriptorSet 0
Decorate 156(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -516,11 +523,9 @@ Shader version: 450
147: 23(int) Constant 0
148: 6(float) Constant 0
149: 7(fvec4) ConstantComposite 148 148 148 148
151: TypePointer Output 144(VS_OUTPUT)
152(@entryPointOutput): 151(ptr) Variable Output
155(g_tTex1df4a): 11(ptr) Variable UniformConstant
156: TypePointer Output 7(fvec4)
157(Pos): 156(ptr) Variable Output
151: TypePointer Output 7(fvec4)
152(Pos): 151(ptr) Variable Output
156(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -598,7 +603,8 @@ Shader version: 450
Store 135(txval42) 143
150: 8(ptr) AccessChain 146(vsout) 147
Store 150 149
153:144(VS_OUTPUT) Load 146(vsout)
Store 152(@entryPointOutput) 153
153: 8(ptr) AccessChain 146(vsout) 147
154: 7(fvec4) Load 153
Store 152(Pos) 154
Return
FunctionEnd