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:
@@ -60,11 +60,11 @@ gl_FragCoord origin is upper left
|
||||
0:18 'r07' (temp int)
|
||||
0:19 Sequence
|
||||
0:19 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:19 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:19 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:
|
||||
@@ -131,20 +131,20 @@ gl_FragCoord origin is upper left
|
||||
0:18 'r07' (temp int)
|
||||
0:19 Sequence
|
||||
0:19 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:19 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:19 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 43
|
||||
// Id's are bound by 45
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 40
|
||||
EntryPoint Fragment 4 "main" 40 44
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r00"
|
||||
@@ -160,7 +160,8 @@ gl_FragCoord origin is upper left
|
||||
MemberName 30(PS_OUTPUT) 0 "color"
|
||||
Name 32 "ps_output"
|
||||
Name 40 "@entryPointOutput"
|
||||
Decorate 40(@entryPointOutput) Location 0
|
||||
Name 44 "color"
|
||||
Decorate 44(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -184,6 +185,8 @@ gl_FragCoord origin is upper left
|
||||
37: TypePointer Function 29(fvec4)
|
||||
39: TypePointer Output 30(PS_OUTPUT)
|
||||
40(@entryPointOutput): 39(ptr) Variable Output
|
||||
43: TypePointer Output 29(fvec4)
|
||||
44(color): 43(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r00): 7(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user