HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
parent
f8e494c18c
commit
d21baed6bc
67 changed files with 4024 additions and 2886 deletions
|
|
@ -19,10 +19,14 @@ gl_FragCoord origin is upper left
|
|||
0:16 1.000000
|
||||
0:16 1.000000
|
||||
0:16 1.000000
|
||||
0:17 Sequence
|
||||
0:17 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:17 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:17 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:17 color: direct index for structure (temp 4-component vector of float)
|
||||
0:17 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:17 Constant:
|
||||
0:17 0 (const int)
|
||||
0:17 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
|
|
@ -51,22 +55,26 @@ gl_FragCoord origin is upper left
|
|||
0:16 1.000000
|
||||
0:16 1.000000
|
||||
0:16 1.000000
|
||||
0:17 Sequence
|
||||
0:17 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:17 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:17 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:17 color: direct index for structure (temp 4-component vector of float)
|
||||
0:17 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:17 Constant:
|
||||
0:17 0 (const int)
|
||||
0:17 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 27
|
||||
// Id's are bound by 26
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 22 26
|
||||
EntryPoint Fragment 4 "main" 22
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 6 "MyFunc("
|
||||
|
|
@ -74,9 +82,8 @@ gl_FragCoord origin is upper left
|
|||
Name 12 "PS_OUTPUT"
|
||||
MemberName 12(PS_OUTPUT) 0 "color"
|
||||
Name 14 "ps_output"
|
||||
Name 22 "@entryPointOutput"
|
||||
Name 26 "color"
|
||||
Decorate 26(color) Location 0
|
||||
Name 22 "color"
|
||||
Decorate 22(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
10: TypeFloat 32
|
||||
|
|
@ -88,17 +95,16 @@ gl_FragCoord origin is upper left
|
|||
17: 10(float) Constant 1065353216
|
||||
18: 11(fvec4) ConstantComposite 17 17 17 17
|
||||
19: TypePointer Function 11(fvec4)
|
||||
21: TypePointer Output 12(PS_OUTPUT)
|
||||
22(@entryPointOutput): 21(ptr) Variable Output
|
||||
25: TypePointer Output 11(fvec4)
|
||||
26(color): 25(ptr) Variable Output
|
||||
21: TypePointer Output 11(fvec4)
|
||||
22(color): 21(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
14(ps_output): 13(ptr) Variable Function
|
||||
20: 19(ptr) AccessChain 14(ps_output) 16
|
||||
Store 20 18
|
||||
23:12(PS_OUTPUT) Load 14(ps_output)
|
||||
Store 22(@entryPointOutput) 23
|
||||
23: 19(ptr) AccessChain 14(ps_output) 16
|
||||
24: 11(fvec4) Load 23
|
||||
Store 22(color) 24
|
||||
Return
|
||||
FunctionEnd
|
||||
6(MyFunc(): 2 Function None 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue