xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/hlsl.staticFuncInit.frag (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1static float x = 1.0;
2
3float f1()
4{
5    static float x = 2.0;
6    x += 10.0;
7    return x;
8}
9
10float f2(float p)
11{
12    static float x = 7.0;
13    x += p;
14    return x;
15}
16
17float4 main() : SV_TARGET
18{
19    return x + f1() + f1() + f2(5.0) + f2(x);
20}
21