HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -85,10 +85,20 @@ gl_FragCoord origin is upper left
|
||||
0:45 1 (const int)
|
||||
0:45 Constant:
|
||||
0:45 1.000000
|
||||
0:47 Sequence
|
||||
0:47 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:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:47 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:47 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:47 Constant:
|
||||
0:47 0 (const int)
|
||||
0:47 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:47 Depth: direct index for structure (temp float FragDepth)
|
||||
0:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:47 Constant:
|
||||
0:47 1 (const int)
|
||||
0:47 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -199,10 +209,20 @@ gl_FragCoord origin is upper left
|
||||
0:45 1 (const int)
|
||||
0:45 Constant:
|
||||
0:45 1.000000
|
||||
0:47 Sequence
|
||||
0:47 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:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:47 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:47 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:47 Constant:
|
||||
0:47 0 (const int)
|
||||
0:47 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:47 Depth: direct index for structure (temp float FragDepth)
|
||||
0:47 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:47 Constant:
|
||||
0:47 1 (const int)
|
||||
0:47 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -225,13 +245,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 127
|
||||
// Id's are bound by 128
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 100 124 126
|
||||
EntryPoint Fragment 4 "main" 100 104
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval20"
|
||||
@@ -251,17 +271,16 @@ gl_FragCoord origin is upper left
|
||||
MemberName 90(PS_OUTPUT) 0 "Color"
|
||||
MemberName 90(PS_OUTPUT) 1 "Depth"
|
||||
Name 92 "psout"
|
||||
Name 100 "@entryPointOutput"
|
||||
Name 103 "g_sSamp2d"
|
||||
Name 106 "g_tTex1df4a"
|
||||
Name 107 "g_tTex1df4"
|
||||
Name 110 "g_tTex1di4"
|
||||
Name 113 "g_tTex1du4"
|
||||
Name 116 "g_tTex3df4"
|
||||
Name 119 "g_tTex3di4"
|
||||
Name 122 "g_tTex3du4"
|
||||
Name 124 "Color"
|
||||
Name 126 "Depth"
|
||||
Name 100 "Color"
|
||||
Name 104 "Depth"
|
||||
Name 108 "g_sSamp2d"
|
||||
Name 111 "g_tTex1df4a"
|
||||
Name 112 "g_tTex1df4"
|
||||
Name 115 "g_tTex1di4"
|
||||
Name 118 "g_tTex1du4"
|
||||
Name 121 "g_tTex3df4"
|
||||
Name 124 "g_tTex3di4"
|
||||
Name 127 "g_tTex3du4"
|
||||
Decorate 12(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
@@ -271,18 +290,18 @@ gl_FragCoord origin is upper left
|
||||
Decorate 70(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 80(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 90(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 103(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 106(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 106(g_tTex1df4a) Binding 1
|
||||
Decorate 107(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 107(g_tTex1df4) Binding 0
|
||||
Decorate 110(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 113(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 116(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 119(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 122(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 124(Color) Location 0
|
||||
Decorate 126(Depth) BuiltIn FragDepth
|
||||
Decorate 100(Color) Location 0
|
||||
Decorate 104(Depth) BuiltIn FragDepth
|
||||
Decorate 108(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 111(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 111(g_tTex1df4a) Binding 1
|
||||
Decorate 112(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 112(g_tTex1df4) Binding 0
|
||||
Decorate 115(g_tTex1di4) DescriptorSet 0
|
||||
Decorate 118(g_tTex1du4) DescriptorSet 0
|
||||
Decorate 121(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 124(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 127(g_tTex3du4) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -345,32 +364,30 @@ gl_FragCoord origin is upper left
|
||||
94: 7(fvec4) ConstantComposite 93 93 93 93
|
||||
96: 24(int) Constant 1
|
||||
97: TypePointer Function 6(float)
|
||||
99: TypePointer Output 90(PS_OUTPUT)
|
||||
100(@entryPointOutput): 99(ptr) Variable Output
|
||||
103(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
104: TypeImage 6(float) 1D sampled format:Unknown
|
||||
105: TypePointer UniformConstant 104
|
||||
106(g_tTex1df4a): 105(ptr) Variable UniformConstant
|
||||
107(g_tTex1df4): 105(ptr) Variable UniformConstant
|
||||
108: TypeImage 24(int) 1D sampled format:Unknown
|
||||
109: TypePointer UniformConstant 108
|
||||
110(g_tTex1di4): 109(ptr) Variable UniformConstant
|
||||
111: TypeImage 41(int) 1D sampled format:Unknown
|
||||
112: TypePointer UniformConstant 111
|
||||
113(g_tTex1du4): 112(ptr) Variable UniformConstant
|
||||
114: TypeImage 6(float) 3D sampled format:Unknown
|
||||
115: TypePointer UniformConstant 114
|
||||
116(g_tTex3df4): 115(ptr) Variable UniformConstant
|
||||
117: TypeImage 24(int) 3D sampled format:Unknown
|
||||
118: TypePointer UniformConstant 117
|
||||
119(g_tTex3di4): 118(ptr) Variable UniformConstant
|
||||
120: TypeImage 41(int) 3D sampled format:Unknown
|
||||
121: TypePointer UniformConstant 120
|
||||
122(g_tTex3du4): 121(ptr) Variable UniformConstant
|
||||
123: TypePointer Output 7(fvec4)
|
||||
124(Color): 123(ptr) Variable Output
|
||||
125: TypePointer Output 6(float)
|
||||
126(Depth): 125(ptr) Variable Output
|
||||
99: TypePointer Output 7(fvec4)
|
||||
100(Color): 99(ptr) Variable Output
|
||||
103: TypePointer Output 6(float)
|
||||
104(Depth): 103(ptr) Variable Output
|
||||
108(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
109: TypeImage 6(float) 1D sampled format:Unknown
|
||||
110: TypePointer UniformConstant 109
|
||||
111(g_tTex1df4a): 110(ptr) Variable UniformConstant
|
||||
112(g_tTex1df4): 110(ptr) Variable UniformConstant
|
||||
113: TypeImage 24(int) 1D sampled format:Unknown
|
||||
114: TypePointer UniformConstant 113
|
||||
115(g_tTex1di4): 114(ptr) Variable UniformConstant
|
||||
116: TypeImage 41(int) 1D sampled format:Unknown
|
||||
117: TypePointer UniformConstant 116
|
||||
118(g_tTex1du4): 117(ptr) Variable UniformConstant
|
||||
119: TypeImage 6(float) 3D sampled format:Unknown
|
||||
120: TypePointer UniformConstant 119
|
||||
121(g_tTex3df4): 120(ptr) Variable UniformConstant
|
||||
122: TypeImage 24(int) 3D sampled format:Unknown
|
||||
123: TypePointer UniformConstant 122
|
||||
124(g_tTex3di4): 123(ptr) Variable UniformConstant
|
||||
125: TypeImage 41(int) 3D sampled format:Unknown
|
||||
126: TypePointer UniformConstant 125
|
||||
127(g_tTex3du4): 126(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval20): 8(ptr) Variable Function
|
||||
@@ -414,7 +431,11 @@ gl_FragCoord origin is upper left
|
||||
Store 95 94
|
||||
98: 97(ptr) AccessChain 92(psout) 96
|
||||
Store 98 93
|
||||
101:90(PS_OUTPUT) Load 92(psout)
|
||||
Store 100(@entryPointOutput) 101
|
||||
101: 8(ptr) AccessChain 92(psout) 25
|
||||
102: 7(fvec4) Load 101
|
||||
Store 100(Color) 102
|
||||
105: 97(ptr) AccessChain 92(psout) 96
|
||||
106: 6(float) Load 105
|
||||
Store 104(Depth) 106
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user