HLSL: Flatten a return struct from an entry point and assign locations after flattening.
Locations now get assigned in order, but skipping built-ins, which can be done post flattening.
This commit is contained in:
parent
7f702124ec
commit
7dc630f3da
93 changed files with 951 additions and 495 deletions
|
|
@ -36,11 +36,11 @@ gl_FragCoord origin is upper left
|
|||
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' (layout(location=0 ) out 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:16 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
|
@ -83,27 +83,28 @@ gl_FragCoord origin is upper left
|
|||
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' (layout(location=0 ) out 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:16 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 34
|
||||
// Id's are bound by 36
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 31
|
||||
EntryPoint Fragment 4 "main" 31 35
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 22 "PS_OUTPUT"
|
||||
MemberName 22(PS_OUTPUT) 0 "color"
|
||||
Name 24 "ps_output"
|
||||
Name 31 "@entryPointOutput"
|
||||
Decorate 31(@entryPointOutput) Location 0
|
||||
Name 35 "color"
|
||||
Decorate 35(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
|
@ -130,6 +131,8 @@ gl_FragCoord origin is upper left
|
|||
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
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
24(ps_output): 23(ptr) Variable Function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue