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:
@@ -168,7 +168,7 @@ gl_FragCoord origin is upper left
|
||||
0:57 1.000000
|
||||
0:59 Sequence
|
||||
0:59 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:59 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:59 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -194,7 +194,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:
|
||||
@@ -369,7 +370,7 @@ gl_FragCoord origin is upper left
|
||||
0:57 1.000000
|
||||
0:59 Sequence
|
||||
0:59 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:59 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:59 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -395,18 +396,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 180
|
||||
// Id's are bound by 184
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 141
|
||||
EntryPoint Fragment 4 "main" 141 181 183
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r10"
|
||||
@@ -445,6 +447,8 @@ gl_FragCoord origin is upper left
|
||||
Name 173 "g_tTexcdf4"
|
||||
Name 176 "g_tTexcdi4"
|
||||
Name 179 "g_tTexcdu4"
|
||||
Name 181 "Color"
|
||||
Name 183 "Depth"
|
||||
Decorate 11(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) Binding 0
|
||||
@@ -457,7 +461,6 @@ gl_FragCoord origin is upper left
|
||||
Decorate 111(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 122(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 130(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 141(@entryPointOutput) Location 0
|
||||
Decorate 146(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 146(g_tTex1df4) Binding 0
|
||||
Decorate 149(g_tTex1di4) DescriptorSet 0
|
||||
@@ -471,6 +474,8 @@ gl_FragCoord origin is upper left
|
||||
Decorate 173(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 176(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 179(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 181(Color) Location 0
|
||||
Decorate 183(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -582,6 +587,10 @@ gl_FragCoord origin is upper left
|
||||
177: TypeImage 43(int) Cube sampled format:Unknown
|
||||
178: TypePointer UniformConstant 177
|
||||
179(g_tTexcdu4): 178(ptr) Variable UniformConstant
|
||||
180: TypePointer Output 103(fvec4)
|
||||
181(Color): 180(ptr) Variable Output
|
||||
182: TypePointer Output 6(float)
|
||||
183(Depth): 182(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r10): 7(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user