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:
@@ -150,7 +150,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
|
||||
@@ -176,7 +176,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:
|
||||
@@ -333,7 +334,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
|
||||
@@ -359,18 +360,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 179
|
||||
// Id's are bound by 183
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 140
|
||||
EntryPoint Fragment 4 "main" 140 180 182
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 8 "r10"
|
||||
@@ -409,6 +411,8 @@ gl_FragCoord origin is upper left
|
||||
Name 172 "g_tTexcdf4"
|
||||
Name 175 "g_tTexcdi4"
|
||||
Name 178 "g_tTexcdu4"
|
||||
Name 180 "Color"
|
||||
Name 182 "Depth"
|
||||
Decorate 11(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) DescriptorSet 0
|
||||
Decorate 15(g_sSamp) Binding 0
|
||||
@@ -421,7 +425,6 @@ gl_FragCoord origin is upper left
|
||||
Decorate 110(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 121(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 129(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 140(@entryPointOutput) Location 0
|
||||
Decorate 145(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 145(g_tTex1df4) Binding 0
|
||||
Decorate 148(g_tTex1di4) DescriptorSet 0
|
||||
@@ -435,6 +438,8 @@ gl_FragCoord origin is upper left
|
||||
Decorate 172(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 175(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 178(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 180(Color) Location 0
|
||||
Decorate 182(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -545,6 +550,10 @@ gl_FragCoord origin is upper left
|
||||
176: TypeImage 42(int) Cube sampled format:Unknown
|
||||
177: TypePointer UniformConstant 176
|
||||
178(g_tTexcdu4): 177(ptr) Variable UniformConstant
|
||||
179: TypePointer Output 102(fvec4)
|
||||
180(Color): 179(ptr) Variable Output
|
||||
181: TypePointer Output 6(float)
|
||||
182(Depth): 181(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(r10): 7(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user