Merge pull request #3031 from rg3igalia/sub-group-size-arb-flat-fix
[platform/upstream/glslang.git] / Test / hlsl.doLoop.frag
1 void f0() {
2     [unroll] do {} while (false);
3 }
4
5 void f1() {
6     [unroll] do {;} while (false);
7 }
8
9 float f2(float input) {
10     do { return (float4)input; } while (input > 2.0);
11 }
12
13 void f3(float input) {
14     do ++input; while (input < 10.0);
15 }
16
17 void f4(float input) {
18     do while (++input < 10.0); while (++input < 10.0); // nest while inside do-while
19 }
20
21 float4 PixelShaderFunction(float input) : COLOR0
22 {
23     f0();
24     f1();
25     f2(input);
26     f3(input);
27     f4(input);
28     return (float4)input;
29 }