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:
@@ -141,7 +141,7 @@ gl_FragCoord origin is upper left
|
||||
0:40 1.000000
|
||||
0:42 Sequence
|
||||
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -156,7 +156,8 @@ gl_FragCoord origin is upper left
|
||||
0:? 'g_tTexcdf4a' (uniform textureCubeArray)
|
||||
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
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:
|
||||
@@ -304,7 +305,7 @@ gl_FragCoord origin is upper left
|
||||
0:40 1.000000
|
||||
0:42 Sequence
|
||||
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -319,18 +320,19 @@ gl_FragCoord origin is upper left
|
||||
0:? 'g_tTexcdf4a' (uniform textureCubeArray)
|
||||
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
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 135
|
||||
// Id's are bound by 139
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 131
|
||||
EntryPoint Fragment 4 "main" 131 136 138
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
@@ -358,6 +360,8 @@ gl_FragCoord origin is upper left
|
||||
Name 123 "psout"
|
||||
Name 131 "@entryPointOutput"
|
||||
Name 134 "g_tTex1df4"
|
||||
Name 136 "Color"
|
||||
Name 138 "Depth"
|
||||
Decorate 12(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4a) Binding 1
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -371,9 +375,10 @@ gl_FragCoord origin is upper left
|
||||
Decorate 101(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 111(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 121(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 131(@entryPointOutput) Location 0
|
||||
Decorate 134(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 134(g_tTex1df4) Binding 0
|
||||
Decorate 136(Color) Location 0
|
||||
Decorate 138(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -455,6 +460,10 @@ gl_FragCoord origin is upper left
|
||||
130: TypePointer Output 121(PS_OUTPUT)
|
||||
131(@entryPointOutput): 130(ptr) Variable Output
|
||||
134(g_tTex1df4): 11(ptr) Variable UniformConstant
|
||||
135: TypePointer Output 7(fvec4)
|
||||
136(Color): 135(ptr) Variable Output
|
||||
137: TypePointer Output 6(float)
|
||||
138(Depth): 137(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user