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

@ -64,10 +64,20 @@ gl_FragCoord origin is upper left
0:33 1 (const int)
0:33 Constant:
0:33 1.000000
0:35 Sequence
0:35 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:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:35 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:35 Color: direct index for structure (temp 4-component vector of float)
0:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:35 Constant:
0:35 0 (const int)
0:35 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:35 Depth: direct index for structure (temp float FragDepth)
0:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:35 Constant:
0:35 1 (const int)
0:35 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@ -150,10 +160,20 @@ gl_FragCoord origin is upper left
0:33 1 (const int)
0:33 Constant:
0:33 1.000000
0:35 Sequence
0:35 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:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:35 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:35 Color: direct index for structure (temp 4-component vector of float)
0:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:35 Constant:
0:35 0 (const int)
0:35 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:35 Depth: direct index for structure (temp float FragDepth)
0:35 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:35 Constant:
0:35 1 (const int)
0:35 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@ -169,13 +189,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 89
// Id's are bound by 90
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 72 86 88
EntryPoint Fragment 4 "main" 72 76
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 9 "txval20"
@ -189,27 +209,26 @@ gl_FragCoord origin is upper left
MemberName 63(PS_OUTPUT) 0 "Color"
MemberName 63(PS_OUTPUT) 1 "Depth"
Name 65 "psout"
Name 72 "@entryPointOutput"
Name 77 "g_tTex1df4a"
Name 78 "g_tTex1df4"
Name 81 "g_tTex1di4"
Name 84 "g_tTex1du4"
Name 86 "Color"
Name 88 "Depth"
Name 72 "Color"
Name 76 "Depth"
Name 82 "g_tTex1df4a"
Name 83 "g_tTex1df4"
Name 86 "g_tTex1di4"
Name 89 "g_tTex1du4"
Decorate 12(g_tTex2df4) DescriptorSet 0
Decorate 16(g_sSamp) DescriptorSet 0
Decorate 16(g_sSamp) Binding 0
Decorate 36(g_tTex2di4) DescriptorSet 0
Decorate 51(g_tTex2du4) DescriptorSet 0
MemberDecorate 63(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 77(g_tTex1df4a) DescriptorSet 0
Decorate 77(g_tTex1df4a) Binding 1
Decorate 78(g_tTex1df4) DescriptorSet 0
Decorate 78(g_tTex1df4) Binding 0
Decorate 81(g_tTex1di4) DescriptorSet 0
Decorate 84(g_tTex1du4) DescriptorSet 0
Decorate 86(Color) Location 0
Decorate 88(Depth) BuiltIn FragDepth
Decorate 72(Color) Location 0
Decorate 76(Depth) BuiltIn FragDepth
Decorate 82(g_tTex1df4a) DescriptorSet 0
Decorate 82(g_tTex1df4a) Binding 1
Decorate 83(g_tTex1df4) DescriptorSet 0
Decorate 83(g_tTex1df4) Binding 0
Decorate 86(g_tTex1di4) DescriptorSet 0
Decorate 89(g_tTex1du4) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@ -259,22 +278,20 @@ gl_FragCoord origin is upper left
66: 6(float) Constant 1065353216
67: 7(fvec4) ConstantComposite 66 66 66 66
69: TypePointer Function 6(float)
71: TypePointer Output 63(PS_OUTPUT)
72(@entryPointOutput): 71(ptr) Variable Output
75: TypeImage 6(float) 1D array sampled format:Unknown
76: TypePointer UniformConstant 75
77(g_tTex1df4a): 76(ptr) Variable UniformConstant
78(g_tTex1df4): 76(ptr) Variable UniformConstant
79: TypeImage 25(int) 1D array sampled format:Unknown
80: TypePointer UniformConstant 79
81(g_tTex1di4): 80(ptr) Variable UniformConstant
82: TypeImage 45(int) 1D array sampled format:Unknown
83: TypePointer UniformConstant 82
84(g_tTex1du4): 83(ptr) Variable UniformConstant
85: TypePointer Output 7(fvec4)
86(Color): 85(ptr) Variable Output
87: TypePointer Output 6(float)
88(Depth): 87(ptr) Variable Output
71: TypePointer Output 7(fvec4)
72(Color): 71(ptr) Variable Output
75: TypePointer Output 6(float)
76(Depth): 75(ptr) Variable Output
80: TypeImage 6(float) 1D array sampled format:Unknown
81: TypePointer UniformConstant 80
82(g_tTex1df4a): 81(ptr) Variable UniformConstant
83(g_tTex1df4): 81(ptr) Variable UniformConstant
84: TypeImage 25(int) 1D array sampled format:Unknown
85: TypePointer UniformConstant 84
86(g_tTex1di4): 85(ptr) Variable UniformConstant
87: TypeImage 45(int) 1D array sampled format:Unknown
88: TypePointer UniformConstant 87
89(g_tTex1du4): 88(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval20): 8(ptr) Variable Function
@ -300,7 +317,11 @@ gl_FragCoord origin is upper left
Store 68 67
70: 69(ptr) AccessChain 65(psout) 27
Store 70 66
73:63(PS_OUTPUT) Load 65(psout)
Store 72(@entryPointOutput) 73
73: 8(ptr) AccessChain 65(psout) 28
74: 7(fvec4) Load 73
Store 72(Color) 74
77: 69(ptr) AccessChain 65(psout) 27
78: 6(float) Load 77
Store 76(Depth) 78
Return
FunctionEnd