HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -223,10 +223,20 @@ gl_FragCoord origin is upper left
|
||||
0:48 1 (const int)
|
||||
0:48 Constant:
|
||||
0:48 1.000000
|
||||
0:50 Sequence
|
||||
0:50 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:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:50 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:50 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:50 Constant:
|
||||
0:50 0 (const int)
|
||||
0:50 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:50 Depth: direct index for structure (temp float FragDepth)
|
||||
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:50 Constant:
|
||||
0:50 1 (const int)
|
||||
0:50 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -474,10 +484,20 @@ gl_FragCoord origin is upper left
|
||||
0:48 1 (const int)
|
||||
0:48 Constant:
|
||||
0:48 1.000000
|
||||
0:50 Sequence
|
||||
0:50 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:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:50 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:50 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:50 Constant:
|
||||
0:50 0 (const int)
|
||||
0:50 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:50 Depth: direct index for structure (temp float FragDepth)
|
||||
0:50 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:50 Constant:
|
||||
0:50 1 (const int)
|
||||
0:50 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -499,13 +519,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 167
|
||||
// Id's are bound by 168
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 159 164 166
|
||||
EntryPoint Fragment 4 "main" 159 163
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
@@ -537,10 +557,9 @@ gl_FragCoord origin is upper left
|
||||
MemberName 148(PS_OUTPUT) 0 "Color"
|
||||
MemberName 148(PS_OUTPUT) 1 "Depth"
|
||||
Name 150 "psout"
|
||||
Name 159 "@entryPointOutput"
|
||||
Name 162 "g_tTex1df4a"
|
||||
Name 164 "Color"
|
||||
Name 166 "Depth"
|
||||
Name 159 "Color"
|
||||
Name 163 "Depth"
|
||||
Name 167 "g_tTex1df4a"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -557,10 +576,10 @@ gl_FragCoord origin is upper left
|
||||
Decorate 133(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 142(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 148(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 162(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 162(g_tTex1df4a) Binding 1
|
||||
Decorate 164(Color) Location 0
|
||||
Decorate 166(Depth) BuiltIn FragDepth
|
||||
Decorate 159(Color) Location 0
|
||||
Decorate 163(Depth) BuiltIn FragDepth
|
||||
Decorate 167(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 167(g_tTex1df4a) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -652,13 +671,11 @@ gl_FragCoord origin is upper left
|
||||
153: 7(fvec4) ConstantComposite 152 152 152 152
|
||||
155: 24(int) Constant 1
|
||||
156: TypePointer Function 6(float)
|
||||
158: TypePointer Output 148(PS_OUTPUT)
|
||||
159(@entryPointOutput): 158(ptr) Variable Output
|
||||
162(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
163: TypePointer Output 7(fvec4)
|
||||
164(Color): 163(ptr) Variable Output
|
||||
165: TypePointer Output 6(float)
|
||||
166(Depth): 165(ptr) Variable Output
|
||||
158: TypePointer Output 7(fvec4)
|
||||
159(Color): 158(ptr) Variable Output
|
||||
162: TypePointer Output 6(float)
|
||||
163(Depth): 162(ptr) Variable Output
|
||||
167(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
@@ -738,7 +755,11 @@ gl_FragCoord origin is upper left
|
||||
Store 154 153
|
||||
157: 156(ptr) AccessChain 150(psout) 155
|
||||
Store 157 152
|
||||
160:148(PS_OUTPUT) Load 150(psout)
|
||||
Store 159(@entryPointOutput) 160
|
||||
160: 8(ptr) AccessChain 150(psout) 151
|
||||
161: 7(fvec4) Load 160
|
||||
Store 159(Color) 161
|
||||
164: 156(ptr) AccessChain 150(psout) 155
|
||||
165: 6(float) Load 164
|
||||
Store 163(Depth) 165
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user