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

@ -1060,10 +1060,20 @@ gl_FragCoord origin is upper left
0:277 1 (const int)
0:277 Constant:
0:277 1.000000
0:279 Sequence
0:279 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:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:279 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:279 Color: direct index for structure (temp 4-component vector of float)
0:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:279 Constant:
0:279 0 (const int)
0:279 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:279 Depth: direct index for structure (temp float FragDepth)
0:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:279 Constant:
0:279 1 (const int)
0:279 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@ -2162,10 +2172,20 @@ gl_FragCoord origin is upper left
0:277 1 (const int)
0:277 Constant:
0:277 1.000000
0:279 Sequence
0:279 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:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? Sequence
0:? Sequence
0:279 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:279 Color: direct index for structure (temp 4-component vector of float)
0:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:279 Constant:
0:279 0 (const int)
0:279 move second child to first child (temp float)
0:? 'Depth' (out float FragDepth)
0:279 Depth: direct index for structure (temp float FragDepth)
0:279 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:279 Constant:
0:279 1 (const int)
0:279 Branch: Return
0:? Linker Objects
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
@ -2201,7 +2221,7 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 544
// Id's are bound by 545
Capability Shader
Capability Sampled1D
@ -2210,7 +2230,7 @@ gl_FragCoord origin is upper left
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 534 541 543
EntryPoint Fragment 4 "main" 534 538
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "sizeQueryTemp"
@ -2298,10 +2318,9 @@ gl_FragCoord origin is upper left
MemberName 522(PS_OUTPUT) 0 "Color"
MemberName 522(PS_OUTPUT) 1 "Depth"
Name 524 "psout"
Name 534 "@entryPointOutput"
Name 539 "g_sSamp"
Name 541 "Color"
Name 543 "Depth"
Name 534 "Color"
Name 538 "Depth"
Name 544 "g_sSamp"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 29(g_tTex1di4) DescriptorSet 0
@ -2331,10 +2350,10 @@ gl_FragCoord origin is upper left
Decorate 496(g_tTex2dmsi4a) DescriptorSet 0
Decorate 510(g_tTex2dmsu4a) DescriptorSet 0
MemberDecorate 522(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 539(g_sSamp) DescriptorSet 0
Decorate 539(g_sSamp) Binding 0
Decorate 541(Color) Location 0
Decorate 543(Depth) BuiltIn FragDepth
Decorate 534(Color) Location 0
Decorate 538(Depth) BuiltIn FragDepth
Decorate 544(g_sSamp) DescriptorSet 0
Decorate 544(g_sSamp) Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@ -2441,15 +2460,13 @@ gl_FragCoord origin is upper left
528: TypePointer Function 521(fvec4)
530: 14(int) Constant 1
531: TypePointer Function 9(float)
533: TypePointer Output 522(PS_OUTPUT)
534(@entryPointOutput): 533(ptr) Variable Output
537: TypeSampler
538: TypePointer UniformConstant 537
539(g_sSamp): 538(ptr) Variable UniformConstant
540: TypePointer Output 521(fvec4)
541(Color): 540(ptr) Variable Output
542: TypePointer Output 9(float)
543(Depth): 542(ptr) Variable Output
533: TypePointer Output 521(fvec4)
534(Color): 533(ptr) Variable Output
537: TypePointer Output 9(float)
538(Depth): 537(ptr) Variable Output
542: TypeSampler
543: TypePointer UniformConstant 542
544(g_sSamp): 543(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
8(sizeQueryTemp): 7(ptr) Variable Function
@ -3063,7 +3080,11 @@ gl_FragCoord origin is upper left
Store 529 527
532: 531(ptr) AccessChain 524(psout) 530
Store 532 526
535:522(PS_OUTPUT) Load 524(psout)
Store 534(@entryPointOutput) 535
535: 528(ptr) AccessChain 524(psout) 525
536: 521(fvec4) Load 535
Store 534(Color) 536
539: 531(ptr) AccessChain 524(psout) 530
540: 9(float) Load 539
Store 538(Depth) 540
Return
FunctionEnd