• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2cbuffer nameless {
3    float3 anonMember1;
4    float3x2 m23;
5    int scalarAfterm23;
6    float4 anonDeadMember2;
7    float4 anonMember3;
8    int scalarBeforeArray;
9    float floatArray[5];
10    int scalarAfterArray;
11    float2x2 m22[9];
12};
13
14cbuffer c_nameless {
15    float3 c_anonMember1;
16    float3x2 c_m23;
17    int c_scalarAfterm23;
18    float4 c_anonDeadMember2;
19    float4 c_anonMember3;
20};
21
22cbuffer namelessdead {
23    int a;
24};
25
26struct N1 {
27    float a;
28};
29
30struct N2 {
31    float b;
32    float c;
33    float d;
34};
35
36struct N3 {
37    N1 n1;
38    N2 n2;
39};
40
41cbuffer nested {
42    N3 foo;
43}
44
45struct TS {
46    int a;
47    int dead;
48};
49
50uniform TS s;
51
52uniform float uf1;
53uniform float uf2;
54uniform float ufDead3;
55uniform float ufDead4;
56
57uniform float2x2 dm22[10];
58
59struct deep1 {
60    float2 va[3];
61    bool b;
62};
63
64struct deep2 {
65    int i;
66    deep1 d1[4];
67};
68
69struct deep3 {
70    float4 iv4;
71    deep2 d2;
72    int3 v3;
73};
74
75uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2];
76
77const bool control = true;
78
79void deadFunction()
80{
81    float4 v = anonDeadMember2;
82    float f = ufDead4;
83}
84
85void liveFunction2()
86{
87    float3 v = anonMember1;
88    float f = uf1;
89}
90
91tbuffer abl {
92    float foo1;
93}
94
95tbuffer abl2 {
96    float foo2;
97}
98
99void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attributeFloat3, in float4 attributeFloat4, in float4x4 attributeMat4)
100{
101    liveFunction2();
102
103    if (! control)
104        deadFunction();
105
106    float f;
107    int i;
108    if (control) {
109        liveFunction2();
110        f = anonMember3.z;
111        f = s.a;
112        f = m23[1].y + scalarAfterm23;
113        f = c_m23[1].y + c_scalarAfterm23;
114        f += scalarBeforeArray;
115        f += floatArray[2];
116        f += floatArray[4];
117        f += scalarAfterArray;
118        f += m22[i][1][0];
119        f += dm22[3][0][1];
120        f += m22[2][1].y;
121        f += foo.n1.a + foo.n2.b + foo.n2.c + foo.n2.d;
122        f += deepA[i].d2.d1[2].va[1].x;
123        f += deepB[1].d2.d1[i].va[1].x;
124        f += deepB[i].d2.d1[i].va[1].x;
125        deep3 d = deepC[1];
126        deep3 da[2] = deepD;
127    } else
128        f = ufDead3;
129
130    f += foo1 + foo2;
131    f += foo2;
132
133    f += attributeFloat;
134    f += attributeFloat2.x;
135    f += attributeFloat3.x;
136    f += attributeFloat4.x;
137    f += attributeMat4[0][1];
138}
139