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:
@@ -171,7 +171,7 @@ gl_FragCoord origin is upper left
|
||||
0:49 1.000000
|
||||
0:51 Sequence
|
||||
0:51 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:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:51 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -190,7 +190,8 @@ gl_FragCoord origin is upper left
|
||||
0:? 'g_tTexcdf4' (uniform textureCube)
|
||||
0:? 'g_tTexcdi4' (uniform itextureCube)
|
||||
0:? 'g_tTexcdu4' (uniform utextureCube)
|
||||
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:
|
||||
@@ -368,7 +369,7 @@ gl_FragCoord origin is upper left
|
||||
0:49 1.000000
|
||||
0:51 Sequence
|
||||
0:51 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:51 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:51 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -387,17 +388,18 @@ gl_FragCoord origin is upper left
|
||||
0:? 'g_tTexcdf4' (uniform textureCube)
|
||||
0:? 'g_tTexcdi4' (uniform itextureCube)
|
||||
0:? 'g_tTexcdu4' (uniform utextureCube)
|
||||
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 160
|
||||
// Id's are bound by 164
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 155
|
||||
EntryPoint Fragment 4 "main" 155 161 163
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
@@ -432,6 +434,8 @@ gl_FragCoord origin is upper left
|
||||
Name 155 "@entryPointOutput"
|
||||
Name 158 "g_sSamp2d"
|
||||
Name 159 "g_tTex1df4a"
|
||||
Name 161 "Color"
|
||||
Name 163 "Depth"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -448,10 +452,11 @@ gl_FragCoord origin is upper left
|
||||
Decorate 129(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 138(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 144(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 155(@entryPointOutput) Location 0
|
||||
Decorate 158(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 159(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 159(g_tTex1df4a) Binding 1
|
||||
Decorate 161(Color) Location 0
|
||||
Decorate 163(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -543,6 +548,10 @@ gl_FragCoord origin is upper left
|
||||
155(@entryPointOutput): 154(ptr) Variable Output
|
||||
158(g_sSamp2d): 15(ptr) Variable UniformConstant
|
||||
159(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
160: TypePointer Output 7(fvec4)
|
||||
161(Color): 160(ptr) Variable Output
|
||||
162: TypePointer Output 6(float)
|
||||
163(Depth): 162(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user