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
|
|
@ -177,7 +177,7 @@ gl_FragCoord origin is upper left
|
|||
0:40 1.000000
|
||||
0:42 Sequence
|
||||
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
|
@ -192,7 +192,8 @@ gl_FragCoord origin is upper left
|
|||
0:? 'g_tTexcdf4' (uniform textureCubeArray)
|
||||
0:? 'g_tTexcdi4' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4' (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:
|
||||
|
|
@ -376,7 +377,7 @@ gl_FragCoord origin is upper left
|
|||
0:40 1.000000
|
||||
0:42 Sequence
|
||||
0:42 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:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
|
@ -391,18 +392,19 @@ gl_FragCoord origin is upper left
|
|||
0:? 'g_tTexcdf4' (uniform textureCubeArray)
|
||||
0:? 'g_tTexcdi4' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4' (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 128
|
||||
// Id's are bound by 132
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 124
|
||||
EntryPoint Fragment 4 "main" 124 129 131
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
|
|
@ -430,6 +432,8 @@ gl_FragCoord origin is upper left
|
|||
Name 115 "psout"
|
||||
Name 124 "@entryPointOutput"
|
||||
Name 127 "g_tTex1df4a"
|
||||
Name 129 "Color"
|
||||
Name 131 "Depth"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
|
|
@ -443,9 +447,10 @@ gl_FragCoord origin is upper left
|
|||
Decorate 98(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 107(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 113(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 124(@entryPointOutput) Location 0
|
||||
Decorate 127(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 127(g_tTex1df4a) Binding 1
|
||||
Decorate 129(Color) Location 0
|
||||
Decorate 131(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -520,6 +525,10 @@ gl_FragCoord origin is upper left
|
|||
123: TypePointer Output 113(PS_OUTPUT)
|
||||
124(@entryPointOutput): 123(ptr) Variable Output
|
||||
127(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
128: TypePointer Output 7(fvec4)
|
||||
129(Color): 128(ptr) Variable Output
|
||||
130: TypePointer Output 6(float)
|
||||
131(Depth): 130(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue