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

@@ -112,10 +112,20 @@ gl_FragCoord origin is upper left
0:34 1 (const int)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 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:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:36 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:36 Color: direct index for structure (temp 4-component vector of float)
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:36 Constant:
0:36 0 (const int)
0:36 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:36 Depth: direct index for structure (temp float FragDepth)
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:36 Constant:
0:36 1 (const int)
0:36 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -246,10 +256,20 @@ gl_FragCoord origin is upper left
0:34 1 (const int)
0:34 Constant:
0:34 1.000000
0:36 Sequence
0:36 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:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:36 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:36 Color: direct index for structure (temp 4-component vector of float)
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:36 Constant:
0:36 0 (const int)
0:36 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:36 Depth: direct index for structure (temp float FragDepth)
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:36 Constant:
0:36 1 (const int)
0:36 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@@ -265,13 +285,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 111
// Id's are bound by 112
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 103 108 110
EntryPoint Fragment 4 "main" 103 107
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval10"
@@ -291,10 +311,9 @@ gl_FragCoord origin is upper left
MemberName 94(PS_OUTPUT) 0 "Color"
MemberName 94(PS_OUTPUT) 1 "Depth"
Name 96 "psout"
Name 103 "@entryPointOutput"
Name 106 "g_tTex1df4a"
Name 108 "Color"
Name 110 "Depth"
Name 103 "Color"
Name 107 "Depth"
Name 111 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -305,10 +324,10 @@ gl_FragCoord origin is upper left
Decorate 73(g_tTex2di4) DescriptorSet 0
Decorate 84(g_tTex2du4) DescriptorSet 0
MemberDecorate 94(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 106(g_tTex1df4a) DescriptorSet 0
Decorate 106(g_tTex1df4a) Binding 1
Decorate 108(Color) Location 0
Decorate 110(Depth) BuiltIn FragDepth
Decorate 103(Color) Location 0
Decorate 107(Depth) BuiltIn FragDepth
Decorate 111(g_tTex1df4a) DescriptorSet 0
Decorate 111(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -374,13 +393,11 @@ gl_FragCoord origin is upper left
97: 6(float) Constant 1065353216
98: 7(fvec4) ConstantComposite 97 97 97 97
100: TypePointer Function 6(float)
102: TypePointer Output 94(PS_OUTPUT)
103(@entryPointOutput): 102(ptr) Variable Output
106(g_tTex1df4a): 11(ptr) Variable UniformConstant
107: TypePointer Output 7(fvec4)
108(Color): 107(ptr) Variable Output
109: TypePointer Output 6(float)
110(Depth): 109(ptr) Variable Output
102: TypePointer Output 7(fvec4)
103(Color): 102(ptr) Variable Output
106: TypePointer Output 6(float)
107(Depth): 106(ptr) Variable Output
111(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -424,7 +441,11 @@ gl_FragCoord origin is upper left
Store 99 98
101: 100(ptr) AccessChain 96(psout) 40
Store 101 97
104:94(PS_OUTPUT) Load 96(psout)
Store 103(@entryPointOutput) 104
104: 8(ptr) AccessChain 96(psout) 26
105: 7(fvec4) Load 104
Store 103(Color) 105
108: 100(ptr) AccessChain 96(psout) 40
109: 6(float) Load 108
Store 107(Depth) 109
Return
FunctionEnd