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:
parent
7f702124ec
commit
7dc630f3da
93 changed files with 951 additions and 495 deletions
|
|
@ -233,7 +233,7 @@ gl_FragCoord origin is upper left
|
|||
0:87 1.000000
|
||||
0:89 Sequence
|
||||
0:89 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:89 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:89 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
|
@ -253,7 +253,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:
|
||||
|
|
@ -491,7 +492,7 @@ gl_FragCoord origin is upper left
|
|||
0:87 1.000000
|
||||
0:89 Sequence
|
||||
0:89 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:89 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:89 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
|
@ -511,17 +512,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 186
|
||||
// Id's are bound by 190
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 180
|
||||
EntryPoint Fragment 4 "main" 180 187 189
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 7 "MemberTest"
|
||||
|
|
@ -571,6 +573,8 @@ gl_FragCoord origin is upper left
|
|||
Name 183 "g_sSamp2d"
|
||||
Name 184 "g_sSamp2D_b"
|
||||
Name 185 "g_tTex1df4a"
|
||||
Name 187 "Color"
|
||||
Name 189 "Depth"
|
||||
Decorate 41(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 41(g_tTex1df4) Binding 0
|
||||
Decorate 45(g_sSamp) DescriptorSet 0
|
||||
|
|
@ -587,11 +591,12 @@ gl_FragCoord origin is upper left
|
|||
Decorate 156(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 165(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 171(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 180(@entryPointOutput) Location 0
|
||||
Decorate 183(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 184(g_sSamp2D_b) DescriptorSet 0
|
||||
Decorate 185(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 185(g_tTex1df4a) Binding 1
|
||||
Decorate 187(Color) Location 0
|
||||
Decorate 189(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
|
@ -696,6 +701,10 @@ gl_FragCoord origin is upper left
|
|||
183(g_sSamp2d): 44(ptr) Variable UniformConstant
|
||||
184(g_sSamp2D_b): 44(ptr) Variable UniformConstant
|
||||
185(g_tTex1df4a): 40(ptr) Variable UniformConstant
|
||||
186: TypePointer Output 36(fvec4)
|
||||
187(Color): 186(ptr) Variable Output
|
||||
188: TypePointer Output 35(float)
|
||||
189(Depth): 188(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(mtest): 8(ptr) Variable Function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue