David Neto | 8c3d5b4 | 2019-10-21 14:50:31 -0400 | [diff] [blame] | 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 | |
John Kessenich | 0c6f936 | 2017-04-20 11:08:24 -0600 | [diff] [blame] | 21 | float4 PixelShaderFunction(float input) : COLOR0 |
John Kessenich | 119f8f6 | 2016-06-05 15:44:07 -0600 | [diff] [blame] | 22 | { |
David Neto | 8c3d5b4 | 2019-10-21 14:50:31 -0400 | [diff] [blame] | 23 | f0(); |
| 24 | f1(); |
| 25 | f2(input); |
| 26 | f3(input); |
| 27 | f4(input); |
John Kessenich | 0c6f936 | 2017-04-20 11:08:24 -0600 | [diff] [blame] | 28 | return (float4)input; |
John Kessenich | 119f8f6 | 2016-06-05 15:44:07 -0600 | [diff] [blame] | 29 | } |