1 static float x = 1.0;
2
3 float f1()
4 {
5 static float x = 2.0;
6 x += 10.0;
7 return x;
8 }
9
10 float f2(float p)
11 {
12 static float x = 7.0;
13 x += p;
14 return x;
15 }
16
17 float4 main() : SV_TARGET
18 {
19 return x + f1() + f1() + f2(5.0) + f2(x);
20 }
21