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:
@@ -57,11 +57,12 @@ gl_FragCoord origin is upper left
|
||||
0:22 3 (const int)
|
||||
0:24 Sequence
|
||||
0:24 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:24 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:24 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:? 'inpos' (noperspective in 4-component vector of float FragCoord)
|
||||
|
||||
|
||||
@@ -126,21 +127,22 @@ gl_FragCoord origin is upper left
|
||||
0:22 3 (const int)
|
||||
0:24 Sequence
|
||||
0:24 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:24 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:24 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:? 'inpos' (noperspective in 4-component vector of float FragCoord)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 56
|
||||
// Id's are bound by 60
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 45 53
|
||||
EntryPoint Fragment 4 "main" 45 53 57 59
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 12 "MyFunc(f1;f1;f1;"
|
||||
@@ -159,10 +161,13 @@ gl_FragCoord origin is upper left
|
||||
Name 33 "psout"
|
||||
Name 45 "inpos"
|
||||
Name 53 "@entryPointOutput"
|
||||
Name 57 "Color"
|
||||
Name 59 "Depth"
|
||||
MemberDecorate 31(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 45(inpos) NoPerspective
|
||||
Decorate 45(inpos) BuiltIn FragCoord
|
||||
Decorate 53(@entryPointOutput) Location 0
|
||||
Decorate 57(Color) Location 0
|
||||
Decorate 59(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -186,6 +191,10 @@ gl_FragCoord origin is upper left
|
||||
48: TypePointer Input 6(float)
|
||||
52: TypePointer Output 31(PS_OUTPUT)
|
||||
53(@entryPointOutput): 52(ptr) Variable Output
|
||||
56: TypePointer Output 30(fvec4)
|
||||
57(Color): 56(ptr) Variable Output
|
||||
58: TypePointer Output 6(float)
|
||||
59(Depth): 58(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
17(x): 7(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user