Michael Ludwig | bf58add | 2021-03-16 10:40:11 -0400 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | #include <simd/simd.h> |
| 3 | using namespace metal; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 4 | struct Inputs { |
| 5 | }; |
| 6 | struct Outputs { |
| 7 | float4 sk_FragColor [[color(0)]]; |
| 8 | }; |
John Stiles | b42b926 | 2021-09-18 12:41:06 -0400 | [diff] [blame^] | 9 | void increment_vfff(thread float& a, thread float& b, thread float& c) { |
| 10 | ((a++ , b++) , c++); |
| 11 | } |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 12 | fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame] | 13 | Outputs _out; |
John Stiles | 3727917 | 2021-01-21 22:24:28 -0500 | [diff] [blame] | 14 | (void)_out; |
John Stiles | b42b926 | 2021-09-18 12:41:06 -0400 | [diff] [blame^] | 15 | float a = 1.0; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 16 | float b = 2.0; |
John Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 17 | float c = 3.0; |
John Stiles | b42b926 | 2021-09-18 12:41:06 -0400 | [diff] [blame^] | 18 | for (int x = 0;x < 1; ++x) { |
| 19 | break; |
| 20 | } |
John Stiles | 7a3f550 | 2021-03-08 13:29:15 -0500 | [diff] [blame] | 21 | float d = c; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 22 | b++; |
| 23 | d++; |
John Stiles | ecd7c22 | 2021-02-08 14:20:28 -0500 | [diff] [blame] | 24 | _out.sk_FragColor = float4(float(b == 2.0), float(b == 3.0), float(d == 5.0), float(d == 4.0)); |
John Stiles | f7410bd | 2021-01-19 13:07:55 -0500 | [diff] [blame] | 25 | return _out; |
John Stiles | aeae3a5 | 2020-09-25 13:35:58 -0400 | [diff] [blame] | 26 | } |