xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/hlsl.doLoop.frag (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1void f0() {
2    [unroll] do {} while (false);
3}
4
5void f1() {
6    [unroll] do {;} while (false);
7}
8
9float f2(float input) {
10    do { return (float4)input; } while (input > 2.0);
11}
12
13void f3(float input) {
14    do ++input; while (input < 10.0);
15}
16
17void f4(float input) {
18    do while (++input < 10.0); while (++input < 10.0); // nest while inside do-while
19}
20
21float4 PixelShaderFunction(float input) : COLOR0
22{
23    f0();
24    f1();
25    f2(input);
26    f3(input);
27    f4(input);
28    return (float4)input;
29}
30