HLSL: Correct which things flattening tracks for linkage, based on caller, not type.

Includes related trackLinkage() code removal and name improvements.
This commit is contained in:
John Kessenich
2017-08-06 19:42:42 -06:00
parent 7497e7c9f3
commit d5aedc199f
5 changed files with 126 additions and 205 deletions

View File

@@ -46,18 +46,33 @@ gl_FragCoord origin is upper left
0:? Linker Objects
0:? 'g_samp' ( uniform sampler)
0:? 'g_tex' ( uniform texture1D)
0:? 'samp' ( uniform sampler)
0:? 'tex' ( uniform texture1D)
0:? 'nonopaque_thing' ( uniform int)
0:? 'g_texdata_array[0].samp' ( uniform sampler)
0:? 'g_texdata_array[0].tex' ( uniform texture1D)
0:? 'g_texdata_array[0].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array[1].samp' ( uniform sampler)
0:? 'g_texdata_array[1].tex' ( uniform texture1D)
0:? 'g_texdata_array[1].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array[2].samp' ( uniform sampler)
0:? 'g_texdata_array[2].tex' ( uniform texture1D)
0:? 'g_texdata_array[2].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array2[0].samp[0]' ( uniform sampler)
0:? 'g_texdata_array2[0].samp[1]' ( uniform sampler)
0:? 'g_texdata_array2[0].tex[0]' ( uniform texture1D)
0:? 'g_texdata_array2[0].tex[1]' ( uniform texture1D)
0:? 'g_texdata_array2[0].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array2[1].samp[0]' ( uniform sampler)
0:? 'g_texdata_array2[1].samp[1]' ( uniform sampler)
0:? 'g_texdata_array2[1].tex[0]' ( uniform texture1D)
0:? 'g_texdata_array2[1].tex[1]' ( uniform texture1D)
0:? 'g_texdata_array2[1].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array2[2].samp[0]' ( uniform sampler)
0:? 'g_texdata_array2[2].samp[1]' ( uniform sampler)
0:? 'g_texdata_array2[2].tex[0]' ( uniform texture1D)
0:? 'g_texdata_array2[2].tex[1]' ( uniform texture1D)
0:? 'g_texdata_array2[2].nonopaque_thing' ( uniform int)
0:? 'color' (layout( location=0) out 4-component vector of float)
@@ -111,23 +126,38 @@ gl_FragCoord origin is upper left
0:? Linker Objects
0:? 'g_samp' ( uniform sampler)
0:? 'g_tex' ( uniform texture1D)
0:? 'samp' ( uniform sampler)
0:? 'tex' ( uniform texture1D)
0:? 'nonopaque_thing' ( uniform int)
0:? 'g_texdata_array[0].samp' ( uniform sampler)
0:? 'g_texdata_array[0].tex' ( uniform texture1D)
0:? 'g_texdata_array[0].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array[1].samp' ( uniform sampler)
0:? 'g_texdata_array[1].tex' ( uniform texture1D)
0:? 'g_texdata_array[1].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array[2].samp' ( uniform sampler)
0:? 'g_texdata_array[2].tex' ( uniform texture1D)
0:? 'g_texdata_array[2].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array2[0].samp[0]' ( uniform sampler)
0:? 'g_texdata_array2[0].samp[1]' ( uniform sampler)
0:? 'g_texdata_array2[0].tex[0]' ( uniform texture1D)
0:? 'g_texdata_array2[0].tex[1]' ( uniform texture1D)
0:? 'g_texdata_array2[0].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array2[1].samp[0]' ( uniform sampler)
0:? 'g_texdata_array2[1].samp[1]' ( uniform sampler)
0:? 'g_texdata_array2[1].tex[0]' ( uniform texture1D)
0:? 'g_texdata_array2[1].tex[1]' ( uniform texture1D)
0:? 'g_texdata_array2[1].nonopaque_thing' ( uniform int)
0:? 'g_texdata_array2[2].samp[0]' ( uniform sampler)
0:? 'g_texdata_array2[2].samp[1]' ( uniform sampler)
0:? 'g_texdata_array2[2].tex[0]' ( uniform texture1D)
0:? 'g_texdata_array2[2].tex[1]' ( uniform texture1D)
0:? 'g_texdata_array2[2].nonopaque_thing' ( uniform int)
0:? 'color' (layout( location=0) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 66
// Id's are bound by 78
Capability Shader
Capability Sampled1D
@@ -152,16 +182,27 @@ gl_FragCoord origin is upper left
Name 51 "color"
Name 54 "g_samp"
Name 55 "g_tex"
Name 56 "g_texdata_array2[0].samp[0]"
Name 57 "g_texdata_array2[0].samp[1]"
Name 58 "g_texdata_array2[0].tex[0]"
Name 59 "g_texdata_array2[0].tex[1]"
Name 60 "g_texdata_array2[1].samp[1]"
Name 61 "g_texdata_array2[1].tex[1]"
Name 62 "g_texdata_array2[2].samp[0]"
Name 63 "g_texdata_array2[2].samp[1]"
Name 64 "g_texdata_array2[2].tex[0]"
Name 65 "g_texdata_array2[2].tex[1]"
Name 57 "nonopaque_thing"
Name 58 "g_texdata_array[0].samp"
Name 59 "g_texdata_array[0].tex"
Name 60 "g_texdata_array[0].nonopaque_thing"
Name 61 "g_texdata_array[1].nonopaque_thing"
Name 62 "g_texdata_array[2].samp"
Name 63 "g_texdata_array[2].tex"
Name 64 "g_texdata_array[2].nonopaque_thing"
Name 65 "g_texdata_array2[0].samp[0]"
Name 66 "g_texdata_array2[0].samp[1]"
Name 67 "g_texdata_array2[0].tex[0]"
Name 68 "g_texdata_array2[0].tex[1]"
Name 69 "g_texdata_array2[0].nonopaque_thing"
Name 70 "g_texdata_array2[1].samp[1]"
Name 71 "g_texdata_array2[1].tex[1]"
Name 72 "g_texdata_array2[1].nonopaque_thing"
Name 73 "g_texdata_array2[2].samp[0]"
Name 74 "g_texdata_array2[2].samp[1]"
Name 75 "g_texdata_array2[2].tex[0]"
Name 76 "g_texdata_array2[2].tex[1]"
Name 77 "g_texdata_array2[2].nonopaque_thing"
Decorate 18(tex) DescriptorSet 0
Decorate 22(samp) DescriptorSet 0
Decorate 28(g_texdata_array[1].tex) DescriptorSet 0
@@ -171,16 +212,20 @@ gl_FragCoord origin is upper left
Decorate 51(color) Location 0
Decorate 54(g_samp) DescriptorSet 0
Decorate 55(g_tex) DescriptorSet 0
Decorate 56(g_texdata_array2[0].samp[0]) DescriptorSet 0
Decorate 57(g_texdata_array2[0].samp[1]) DescriptorSet 0
Decorate 58(g_texdata_array2[0].tex[0]) DescriptorSet 0
Decorate 59(g_texdata_array2[0].tex[1]) DescriptorSet 0
Decorate 60(g_texdata_array2[1].samp[1]) DescriptorSet 0
Decorate 61(g_texdata_array2[1].tex[1]) DescriptorSet 0
Decorate 62(g_texdata_array2[2].samp[0]) DescriptorSet 0
Decorate 63(g_texdata_array2[2].samp[1]) DescriptorSet 0
Decorate 64(g_texdata_array2[2].tex[0]) DescriptorSet 0
Decorate 65(g_texdata_array2[2].tex[1]) DescriptorSet 0
Decorate 58(g_texdata_array[0].samp) DescriptorSet 0
Decorate 59(g_texdata_array[0].tex) DescriptorSet 0
Decorate 62(g_texdata_array[2].samp) DescriptorSet 0
Decorate 63(g_texdata_array[2].tex) DescriptorSet 0
Decorate 65(g_texdata_array2[0].samp[0]) DescriptorSet 0
Decorate 66(g_texdata_array2[0].samp[1]) DescriptorSet 0
Decorate 67(g_texdata_array2[0].tex[0]) DescriptorSet 0
Decorate 68(g_texdata_array2[0].tex[1]) DescriptorSet 0
Decorate 70(g_texdata_array2[1].samp[1]) DescriptorSet 0
Decorate 71(g_texdata_array2[1].tex[1]) DescriptorSet 0
Decorate 73(g_texdata_array2[2].samp[0]) DescriptorSet 0
Decorate 74(g_texdata_array2[2].samp[1]) DescriptorSet 0
Decorate 75(g_texdata_array2[2].tex[0]) DescriptorSet 0
Decorate 76(g_texdata_array2[2].tex[1]) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -209,16 +254,28 @@ gl_FragCoord origin is upper left
51(color): 50(ptr) Variable Output
54(g_samp): 21(ptr) Variable UniformConstant
55(g_tex): 17(ptr) Variable UniformConstant
56(g_texdata_array2[0].samp[0]): 21(ptr) Variable UniformConstant
57(g_texdata_array2[0].samp[1]): 21(ptr) Variable UniformConstant
58(g_texdata_array2[0].tex[0]): 17(ptr) Variable UniformConstant
59(g_texdata_array2[0].tex[1]): 17(ptr) Variable UniformConstant
60(g_texdata_array2[1].samp[1]): 21(ptr) Variable UniformConstant
61(g_texdata_array2[1].tex[1]): 17(ptr) Variable UniformConstant
62(g_texdata_array2[2].samp[0]): 21(ptr) Variable UniformConstant
63(g_texdata_array2[2].samp[1]): 21(ptr) Variable UniformConstant
64(g_texdata_array2[2].tex[0]): 17(ptr) Variable UniformConstant
65(g_texdata_array2[2].tex[1]): 17(ptr) Variable UniformConstant
56: TypePointer UniformConstant 14(int)
57(nonopaque_thing): 56(ptr) Variable UniformConstant
58(g_texdata_array[0].samp): 21(ptr) Variable UniformConstant
59(g_texdata_array[0].tex): 17(ptr) Variable UniformConstant
60(g_texdata_array[0].nonopaque_thing): 56(ptr) Variable UniformConstant
61(g_texdata_array[1].nonopaque_thing): 56(ptr) Variable UniformConstant
62(g_texdata_array[2].samp): 21(ptr) Variable UniformConstant
63(g_texdata_array[2].tex): 17(ptr) Variable UniformConstant
64(g_texdata_array[2].nonopaque_thing): 56(ptr) Variable UniformConstant
65(g_texdata_array2[0].samp[0]): 21(ptr) Variable UniformConstant
66(g_texdata_array2[0].samp[1]): 21(ptr) Variable UniformConstant
67(g_texdata_array2[0].tex[0]): 17(ptr) Variable UniformConstant
68(g_texdata_array2[0].tex[1]): 17(ptr) Variable UniformConstant
69(g_texdata_array2[0].nonopaque_thing): 56(ptr) Variable UniformConstant
70(g_texdata_array2[1].samp[1]): 21(ptr) Variable UniformConstant
71(g_texdata_array2[1].tex[1]): 17(ptr) Variable UniformConstant
72(g_texdata_array2[1].nonopaque_thing): 56(ptr) Variable UniformConstant
73(g_texdata_array2[2].samp[0]): 21(ptr) Variable UniformConstant
74(g_texdata_array2[2].samp[1]): 21(ptr) Variable UniformConstant
75(g_texdata_array2[2].tex[0]): 17(ptr) Variable UniformConstant
76(g_texdata_array2[2].tex[1]): 17(ptr) Variable UniformConstant
77(g_texdata_array2[2].nonopaque_thing): 56(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
46(ps_output): 9(ptr) Variable Function