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:
@@ -42,7 +42,7 @@ gl_FragCoord origin is upper left
|
||||
0:35 1.000000
|
||||
0:37 Sequence
|
||||
0:37 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:37 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:37 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -58,7 +58,8 @@ gl_FragCoord origin is upper left
|
||||
0:? 'o2' (uniform 2-component vector of int)
|
||||
0:? 'o3' (uniform 3-component vector of int)
|
||||
0:? 'o4' (uniform 4-component vector of int)
|
||||
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)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -107,7 +108,7 @@ gl_FragCoord origin is upper left
|
||||
0:35 1.000000
|
||||
0:37 Sequence
|
||||
0:37 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:37 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:37 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -123,17 +124,18 @@ gl_FragCoord origin is upper left
|
||||
0:? 'o2' (uniform 2-component vector of int)
|
||||
0:? 'o3' (uniform 3-component vector of int)
|
||||
0:? 'o4' (uniform 4-component vector of int)
|
||||
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)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 71
|
||||
// Id's are bound by 75
|
||||
|
||||
Capability Shader
|
||||
Capability SampledBuffer
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 55
|
||||
EntryPoint Fragment 4 "main" 55 72 74
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "r00"
|
||||
@@ -156,13 +158,16 @@ gl_FragCoord origin is upper left
|
||||
Name 68 "o2"
|
||||
Name 69 "o3"
|
||||
Name 70 "o4"
|
||||
Name 72 "Color"
|
||||
Name 74 "Depth"
|
||||
Decorate 13(g_tTexbf4) DescriptorSet 0
|
||||
Decorate 27(g_tTexbi4) DescriptorSet 0
|
||||
Decorate 39(g_tTexbu4) DescriptorSet 0
|
||||
MemberDecorate 44(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 55(@entryPointOutput) Location 0
|
||||
Decorate 58(g_tTexbf4_test) DescriptorSet 0
|
||||
Decorate 58(g_tTexbf4_test) Binding 0
|
||||
Decorate 72(Color) Location 0
|
||||
Decorate 74(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -210,6 +215,10 @@ gl_FragCoord origin is upper left
|
||||
68(o2): 60(ptr) Variable UniformConstant
|
||||
69(o3): 63(ptr) Variable UniformConstant
|
||||
70(o4): 65(ptr) Variable UniformConstant
|
||||
71: TypePointer Output 7(fvec4)
|
||||
72(Color): 71(ptr) Variable Output
|
||||
73: TypePointer Output 6(float)
|
||||
74(Depth): 73(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(r00): 8(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user