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
|
|
@ -43,10 +43,14 @@ gl_FragCoord origin is upper left
|
|||
0:30 1.000000
|
||||
0:30 1.000000
|
||||
0:30 1.000000
|
||||
0:31 Sequence
|
||||
0:31 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:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:31 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:31 color: direct index for structure (temp 4-component vector of float)
|
||||
0:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:31 Constant:
|
||||
0:31 0 (const int)
|
||||
0:31 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
|
|
@ -99,22 +103,26 @@ gl_FragCoord origin is upper left
|
|||
0:30 1.000000
|
||||
0:30 1.000000
|
||||
0:30 1.000000
|
||||
0:31 Sequence
|
||||
0:31 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:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:31 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:31 color: direct index for structure (temp 4-component vector of float)
|
||||
0:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:31 Constant:
|
||||
0:31 0 (const int)
|
||||
0:31 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 48
|
||||
// Id's are bound by 47
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 43 47
|
||||
EntryPoint Fragment 4 "main" 43
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 6 "Test1("
|
||||
|
|
@ -131,9 +139,8 @@ gl_FragCoord origin is upper left
|
|||
Name 34 "PS_OUTPUT"
|
||||
MemberName 34(PS_OUTPUT) 0 "color"
|
||||
Name 36 "ps_output"
|
||||
Name 43 "@entryPointOutput"
|
||||
Name 47 "color"
|
||||
Decorate 47(color) Location 0
|
||||
Name 43 "color"
|
||||
Decorate 43(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
|
|
@ -163,18 +170,17 @@ gl_FragCoord origin is upper left
|
|||
38: 37(int) Constant 0
|
||||
39: 33(fvec4) ConstantComposite 13 13 13 13
|
||||
40: TypePointer Function 33(fvec4)
|
||||
42: TypePointer Output 34(PS_OUTPUT)
|
||||
43(@entryPointOutput): 42(ptr) Variable Output
|
||||
46: TypePointer Output 33(fvec4)
|
||||
47(color): 46(ptr) Variable Output
|
||||
42: TypePointer Output 33(fvec4)
|
||||
43(color): 42(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
36(ps_output): 35(ptr) Variable Function
|
||||
32: 2 FunctionCall 6(Test1()
|
||||
41: 40(ptr) AccessChain 36(ps_output) 38
|
||||
Store 41 39
|
||||
44:34(PS_OUTPUT) Load 36(ps_output)
|
||||
Store 43(@entryPointOutput) 44
|
||||
44: 40(ptr) AccessChain 36(ps_output) 38
|
||||
45: 33(fvec4) Load 44
|
||||
Store 43(color) 45
|
||||
Return
|
||||
FunctionEnd
|
||||
6(Test1(): 2 Function None 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue