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:
John Kessenich 2016-09-16 01:44:43 -06:00
parent 7f702124ec
commit 7dc630f3da
93 changed files with 951 additions and 495 deletions

View file

@ -7,13 +7,13 @@ Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 185
// Id's are bound by 189
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 180
EntryPoint Fragment 4 "main" 180 186 188
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 7 "MemberTest"
@ -63,6 +63,8 @@ Linked fragment stage:
Name 182 "g_sSamp2d"
Name 183 "g_sSamp2D_b"
Name 184 "g_tTex1df4a"
Name 186 "Color"
Name 188 "Depth"
Decorate 41(g_tTex1df4) DescriptorSet 0
Decorate 41(g_tTex1df4) Binding 0
Decorate 45(g_sSamp) DescriptorSet 0
@ -79,11 +81,12 @@ Linked fragment stage:
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 182(g_sSamp2d) DescriptorSet 0
Decorate 183(g_sSamp2D_b) DescriptorSet 0
Decorate 184(g_tTex1df4a) DescriptorSet 0
Decorate 184(g_tTex1df4a) Binding 1
Decorate 186(Color) Location 0
Decorate 188(Depth) BuiltIn FragDepth
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -188,6 +191,10 @@ Linked fragment stage:
182(g_sSamp2d): 44(ptr) Variable UniformConstant
183(g_sSamp2D_b): 44(ptr) Variable UniformConstant
184(g_tTex1df4a): 40(ptr) Variable UniformConstant
185: TypePointer Output 36(fvec4)
186(Color): 185(ptr) Variable Output
187: TypePointer Output 35(float)
188(Depth): 187(ptr) Variable Output
4(main): 2 Function None 3
5: Label
9(mtest): 8(ptr) Variable Function