blob: deabebc64e6909e9593392994fe9f5d2906a080e [file] [log] [blame]
John Stiles639e8122021-05-24 10:52:23 -04001uniform float unknownInput;
2
John Stilesb0245492020-09-14 17:30:13 -04003void main() {
4 // Basic switch test.
John Stiles639e8122021-05-24 10:52:23 -04005 half value;
6 switch (int(unknownInput)) {
John Stilesb0245492020-09-14 17:30:13 -04007 case 0:
John Stiles639e8122021-05-24 10:52:23 -04008 value = 0.0;
John Stilesb0245492020-09-14 17:30:13 -04009 break;
10 case 1:
John Stiles639e8122021-05-24 10:52:23 -040011 value = 1.0;
John Stilesb0245492020-09-14 17:30:13 -040012 break;
13 default:
John Stiles639e8122021-05-24 10:52:23 -040014 value = 2.0;
John Stilesb0245492020-09-14 17:30:13 -040015 }
John Stiles639e8122021-05-24 10:52:23 -040016 sk_FragColor = value.xxxx;
John Stilesb0245492020-09-14 17:30:13 -040017}