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:
@@ -108,7 +108,7 @@ gl_FragCoord origin is upper left
|
||||
0:68 1.000000
|
||||
0:70 Sequence
|
||||
0:70 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:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -142,7 +142,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:
|
||||
@@ -257,7 +258,7 @@ gl_FragCoord origin is upper left
|
||||
0:68 1.000000
|
||||
0:70 Sequence
|
||||
0:70 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:70 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:70 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -291,18 +292,19 @@ 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 145
|
||||
// Id's are bound by 149
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 87
|
||||
EntryPoint Fragment 4 "main" 87 146 148
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "g_tTex1df4a"
|
||||
@@ -340,6 +342,8 @@ gl_FragCoord origin is upper left
|
||||
Name 142 "o2"
|
||||
Name 143 "o3"
|
||||
Name 144 "o4"
|
||||
Name 146 "Color"
|
||||
Name 148 "Depth"
|
||||
Decorate 9(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 27(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 37(g_tTex1du4a) DescriptorSet 0
|
||||
@@ -347,7 +351,6 @@ gl_FragCoord origin is upper left
|
||||
Decorate 59(g_tTex2di4a) DescriptorSet 0
|
||||
Decorate 68(g_tTex2du4a) DescriptorSet 0
|
||||
MemberDecorate 75(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 87(@entryPointOutput) Location 0
|
||||
Decorate 92(g_sSamp) DescriptorSet 0
|
||||
Decorate 92(g_sSamp) Binding 0
|
||||
Decorate 95(g_tTex1df4) DescriptorSet 0
|
||||
@@ -366,6 +369,8 @@ gl_FragCoord origin is upper left
|
||||
Decorate 131(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 134(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 137(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 146(Color) Location 0
|
||||
Decorate 148(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -466,6 +471,10 @@ gl_FragCoord origin is upper left
|
||||
142(o2): 139(ptr) Variable UniformConstant
|
||||
143(o3): 13(ptr) Variable UniformConstant
|
||||
144(o4): 49(ptr) Variable UniformConstant
|
||||
145: TypePointer Output 23(fvec4)
|
||||
146(Color): 145(ptr) Variable Output
|
||||
147: TypePointer Output 6(float)
|
||||
148(Depth): 147(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
77(psout): 76(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user