blob: e62a3da7c30e383a4e316eb6058db0aa307d8d2d [file] [log] [blame]
Michael Ludwigbf58add2021-03-16 10:40:11 -04001#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
John Stilesaeae3a52020-09-25 13:35:58 -04004struct Inputs {
5};
6struct Outputs {
7 float4 sk_FragColor [[color(0)]];
8};
John Stilesb42b9262021-09-18 12:41:06 -04009void increment_vfff(thread float& a, thread float& b, thread float& c) {
10 ((a++ , b++) , c++);
11}
John Stilesaeae3a52020-09-25 13:35:58 -040012fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
John Stilesf7410bd2021-01-19 13:07:55 -050013 Outputs _out;
John Stiles37279172021-01-21 22:24:28 -050014 (void)_out;
John Stilesb42b9262021-09-18 12:41:06 -040015 float a = 1.0;
John Stilesaeae3a52020-09-25 13:35:58 -040016 float b = 2.0;
John Stiles7a3f5502021-03-08 13:29:15 -050017 float c = 3.0;
John Stilesb42b9262021-09-18 12:41:06 -040018 for (int x = 0;x < 1; ++x) {
19 break;
20 }
John Stiles7a3f5502021-03-08 13:29:15 -050021 float d = c;
John Stilesaeae3a52020-09-25 13:35:58 -040022 b++;
23 d++;
John Stilesecd7c222021-02-08 14:20:28 -050024 _out.sk_FragColor = float4(float(b == 2.0), float(b == 3.0), float(d == 5.0), float(d == 4.0));
John Stilesf7410bd2021-01-19 13:07:55 -050025 return _out;
John Stilesaeae3a52020-09-25 13:35:58 -040026}