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

@@ -34,10 +34,14 @@ gl_FragCoord origin is upper left
0:15 1.000000
0:15 1.000000
0:15 1.000000
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:? Sequence
0:? Sequence
0:16 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:16 color: direct index for structure (temp 4-component vector of float)
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:16 Constant:
0:16 0 (const int)
0:16 Branch: Return
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
@@ -81,30 +85,33 @@ gl_FragCoord origin is upper left
0:15 1.000000
0:15 1.000000
0:15 1.000000
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:? Sequence
0:? Sequence
0:16 move second child to first child (temp 4-component vector of float)
0:? 'color' (layout(location=0 ) out 4-component vector of float)
0:16 color: direct index for structure (temp 4-component vector of float)
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:16 Constant:
0:16 0 (const int)
0:16 Branch: Return
0:? Linker Objects
0:? 'color' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 36
// Id's are bound by 35
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 31 35
EntryPoint Fragment 4 "main" 31
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 22 "PS_OUTPUT"
MemberName 22(PS_OUTPUT) 0 "color"
Name 24 "ps_output"
Name 31 "@entryPointOutput"
Name 35 "color"
Decorate 35(color) Location 0
Name 31 "color"
Decorate 31(color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@@ -129,16 +136,15 @@ gl_FragCoord origin is upper left
26: 13(float) Constant 1065353216
27: 21(fvec4) ConstantComposite 26 26 26 26
28: TypePointer Function 21(fvec4)
30: TypePointer Output 22(PS_OUTPUT)
31(@entryPointOutput): 30(ptr) Variable Output
34: TypePointer Output 21(fvec4)
35(color): 34(ptr) Variable Output
30: TypePointer Output 21(fvec4)
31(color): 30(ptr) Variable Output
4(main): 2 Function None 3
5: Label
24(ps_output): 23(ptr) Variable Function
29: 28(ptr) AccessChain 24(ps_output) 25
Store 29 27
32:22(PS_OUTPUT) Load 24(ps_output)
Store 31(@entryPointOutput) 32
32: 28(ptr) AccessChain 24(ps_output) 25
33: 21(fvec4) Load 32
Store 31(color) 33
Return
FunctionEnd