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:58 1.000000
|
||||
0:60 Sequence
|
||||
0:60 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:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:60 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -167,7 +167,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:
|
||||
@@ -315,7 +316,7 @@ gl_FragCoord origin is upper left
|
||||
0:58 1.000000
|
||||
0:60 Sequence
|
||||
0:60 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:60 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:60 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -341,18 +342,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 177
|
||||
// Id's are bound by 181
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 138
|
||||
EntryPoint Fragment 4 "main" 138 178 180
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r00"
|
||||
@@ -391,6 +393,8 @@ gl_FragCoord origin is upper left
|
||||
Name 170 "g_tTexcdf4a"
|
||||
Name 173 "g_tTexcdi4a"
|
||||
Name 176 "g_tTexcdu4a"
|
||||
Name 178 "Color"
|
||||
Name 180 "Depth"
|
||||
Decorate 11(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 11(g_tTex1df4) Binding 0
|
||||
Decorate 15(g_sSamp) DescriptorSet 0
|
||||
@@ -404,7 +408,6 @@ gl_FragCoord origin is upper left
|
||||
Decorate 105(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 117(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 127(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 138(@entryPointOutput) Location 0
|
||||
Decorate 143(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 146(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 149(g_tTex3du4) DescriptorSet 0
|
||||
@@ -417,6 +420,8 @@ gl_FragCoord origin is upper left
|
||||
Decorate 170(g_tTexcdf4a) DescriptorSet 0
|
||||
Decorate 173(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 176(g_tTexcdu4a) DescriptorSet 0
|
||||
Decorate 178(Color) Location 0
|
||||
Decorate 180(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -525,6 +530,10 @@ gl_FragCoord origin is upper left
|
||||
174: TypeImage 37(int) Cube array sampled format:Unknown
|
||||
175: TypePointer UniformConstant 174
|
||||
176(g_tTexcdu4a): 175(ptr) Variable UniformConstant
|
||||
177: TypePointer Output 126(fvec4)
|
||||
178(Color): 177(ptr) Variable Output
|
||||
179: TypePointer Output 6(float)
|
||||
180(Depth): 179(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r00): 7(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user