HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -262,10 +262,20 @@ gl_FragCoord origin is upper left
|
||||
0:68 1 (const int)
|
||||
0:68 Constant:
|
||||
0:68 1.000000
|
||||
0:70 Sequence
|
||||
0:70 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:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:70 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:70 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Constant:
|
||||
0:70 0 (const int)
|
||||
0:70 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:70 Depth: direct index for structure (temp float FragDepth)
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Constant:
|
||||
0:70 1 (const int)
|
||||
0:70 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -553,10 +563,20 @@ gl_FragCoord origin is upper left
|
||||
0:68 1 (const int)
|
||||
0:68 Constant:
|
||||
0:68 1.000000
|
||||
0:70 Sequence
|
||||
0:70 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:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:70 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:70 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Constant:
|
||||
0:70 0 (const int)
|
||||
0:70 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:70 Depth: direct index for structure (temp float FragDepth)
|
||||
0:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Constant:
|
||||
0:70 1 (const int)
|
||||
0:70 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -579,14 +599,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 226
|
||||
// Id's are bound by 227
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 204 223 225
|
||||
EntryPoint Fragment 4 "main" 204 208
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval00"
|
||||
@@ -626,15 +646,14 @@ gl_FragCoord origin is upper left
|
||||
MemberName 195(PS_OUTPUT) 0 "Color"
|
||||
MemberName 195(PS_OUTPUT) 1 "Depth"
|
||||
Name 197 "psout"
|
||||
Name 204 "@entryPointOutput"
|
||||
Name 207 "g_sSamp2d"
|
||||
Name 210 "g_tTex1df4a"
|
||||
Name 213 "g_tTex1di4a"
|
||||
Name 216 "g_tTex1du4a"
|
||||
Name 218 "c1"
|
||||
Name 221 "c2"
|
||||
Name 223 "Color"
|
||||
Name 225 "Depth"
|
||||
Name 204 "Color"
|
||||
Name 208 "Depth"
|
||||
Name 212 "g_sSamp2d"
|
||||
Name 215 "g_tTex1df4a"
|
||||
Name 218 "g_tTex1di4a"
|
||||
Name 221 "g_tTex1du4a"
|
||||
Name 223 "c1"
|
||||
Name 226 "c2"
|
||||
Decorate 12(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
@@ -644,13 +663,13 @@ gl_FragCoord origin is upper left
|
||||
Decorate 124(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 134(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 195(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 207(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 210(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 210(g_tTex1df4a) Binding 0
|
||||
Decorate 213(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 216(g_tTex1du4a) DescriptorSet 0
|
||||
Decorate 223(Color) Location 0
|
||||
Decorate 225(Depth) BuiltIn FragDepth
|
||||
Decorate 204(Color) Location 0
|
||||
Decorate 208(Depth) BuiltIn FragDepth
|
||||
Decorate 212(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 215(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 215(g_tTex1df4a) Binding 0
|
||||
Decorate 218(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 221(g_tTex1du4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -703,27 +722,25 @@ gl_FragCoord origin is upper left
|
||||
198: 6(float) Constant 1065353216
|
||||
199: 7(fvec4) ConstantComposite 198 198 198 198
|
||||
201: TypePointer Function 6(float)
|
||||
203: TypePointer Output 195(PS_OUTPUT)
|
||||
204(@entryPointOutput): 203(ptr) Variable Output
|
||||
207(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
208: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
209: TypePointer UniformConstant 208
|
||||
210(g_tTex1df4a): 209(ptr) Variable UniformConstant
|
||||
211: TypeImage 24(int) 1D array sampled format:Unknown
|
||||
212: TypePointer UniformConstant 211
|
||||
213(g_tTex1di4a): 212(ptr) Variable UniformConstant
|
||||
214: TypeImage 39(int) 1D array sampled format:Unknown
|
||||
215: TypePointer UniformConstant 214
|
||||
216(g_tTex1du4a): 215(ptr) Variable UniformConstant
|
||||
217: TypePointer UniformConstant 6(float)
|
||||
218(c1): 217(ptr) Variable UniformConstant
|
||||
219: TypeVector 6(float) 2
|
||||
220: TypePointer UniformConstant 219(fvec2)
|
||||
221(c2): 220(ptr) Variable UniformConstant
|
||||
222: TypePointer Output 7(fvec4)
|
||||
223(Color): 222(ptr) Variable Output
|
||||
224: TypePointer Output 6(float)
|
||||
225(Depth): 224(ptr) Variable Output
|
||||
203: TypePointer Output 7(fvec4)
|
||||
204(Color): 203(ptr) Variable Output
|
||||
207: TypePointer Output 6(float)
|
||||
208(Depth): 207(ptr) Variable Output
|
||||
212(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
213: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
214: TypePointer UniformConstant 213
|
||||
215(g_tTex1df4a): 214(ptr) Variable UniformConstant
|
||||
216: TypeImage 24(int) 1D array sampled format:Unknown
|
||||
217: TypePointer UniformConstant 216
|
||||
218(g_tTex1di4a): 217(ptr) Variable UniformConstant
|
||||
219: TypeImage 39(int) 1D array sampled format:Unknown
|
||||
220: TypePointer UniformConstant 219
|
||||
221(g_tTex1du4a): 220(ptr) Variable UniformConstant
|
||||
222: TypePointer UniformConstant 6(float)
|
||||
223(c1): 222(ptr) Variable UniformConstant
|
||||
224: TypeVector 6(float) 2
|
||||
225: TypePointer UniformConstant 224(fvec2)
|
||||
226(c2): 225(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval00): 8(ptr) Variable Function
|
||||
@@ -899,7 +916,11 @@ gl_FragCoord origin is upper left
|
||||
Store 200 199
|
||||
202: 201(ptr) AccessChain 197(psout) 57
|
||||
Store 202 198
|
||||
205:195(PS_OUTPUT) Load 197(psout)
|
||||
Store 204(@entryPointOutput) 205
|
||||
205: 8(ptr) AccessChain 197(psout) 25
|
||||
206: 7(fvec4) Load 205
|
||||
Store 204(Color) 206
|
||||
209: 201(ptr) AccessChain 197(psout) 57
|
||||
210: 6(float) Load 209
|
||||
Store 208(Depth) 210
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user