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

@@ -108,10 +108,14 @@ gl_FragCoord origin is upper left
0:47 0 (const int)
0:47 Construct vec4 (temp 4-component vector of float)
0:47 'e2_11' (temp float)
0:48 Sequence
0:48 move second child to first child (temp structure{temp 4-component vector of float Color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color})
0:48 'psout' (temp structure{temp 4-component vector of float Color})
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})
0:48 Constant:
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'idx' (uniform int)
@@ -231,10 +235,14 @@ gl_FragCoord origin is upper left
0:47 0 (const int)
0:47 Construct vec4 (temp 4-component vector of float)
0:47 'e2_11' (temp float)
0:48 Sequence
0:48 move second child to first child (temp structure{temp 4-component vector of float Color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color})
0:48 'psout' (temp structure{temp 4-component vector of float Color})
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})
0:48 Constant:
0:48 0 (const int)
0:48 Branch: Return
0:? Linker Objects
0:? 'idx' (uniform int)
@@ -243,12 +251,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 76
// Id's are bound by 75
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 71 75
EntryPoint Fragment 4 "main" 71
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "e1_00"
@@ -274,9 +282,8 @@ gl_FragCoord origin is upper left
Name 62 "PS_OUTPUT"
MemberName 62(PS_OUTPUT) 0 "Color"
Name 64 "psout"
Name 71 "@entryPointOutput"
Name 75 "Color"
Decorate 75(Color) Location 0
Name 71 "Color"
Decorate 71(Color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -315,10 +322,8 @@ gl_FragCoord origin is upper left
63: TypePointer Function 62(PS_OUTPUT)
65: 46(int) Constant 0
68: TypePointer Function 61(fvec4)
70: TypePointer Output 62(PS_OUTPUT)
71(@entryPointOutput): 70(ptr) Variable Output
74: TypePointer Output 61(fvec4)
75(Color): 74(ptr) Variable Output
70: TypePointer Output 61(fvec4)
71(Color): 70(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(e1_00): 7(ptr) Variable Function
@@ -368,7 +373,8 @@ gl_FragCoord origin is upper left
67: 61(fvec4) CompositeConstruct 66 66 66 66
69: 68(ptr) AccessChain 64(psout) 65
Store 69 67
72:62(PS_OUTPUT) Load 64(psout)
Store 71(@entryPointOutput) 72
72: 68(ptr) AccessChain 64(psout) 65
73: 61(fvec4) Load 72
Store 71(Color) 73
Return
FunctionEnd