John Stiles | 639e812 | 2021-05-24 10:52:23 -0400 | [diff] [blame^] | 1 | uniform float unknownInput; |
2 | |||||
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 3 | void main() { |
4 | // Basic switch test. | ||||
John Stiles | 639e812 | 2021-05-24 10:52:23 -0400 | [diff] [blame^] | 5 | half value; |
6 | switch (int(unknownInput)) { | ||||
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 7 | case 0: |
John Stiles | 639e812 | 2021-05-24 10:52:23 -0400 | [diff] [blame^] | 8 | value = 0.0; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 9 | break; |
10 | case 1: | ||||
John Stiles | 639e812 | 2021-05-24 10:52:23 -0400 | [diff] [blame^] | 11 | value = 1.0; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 12 | break; |
13 | default: | ||||
John Stiles | 639e812 | 2021-05-24 10:52:23 -0400 | [diff] [blame^] | 14 | value = 2.0; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 15 | } |
John Stiles | 639e812 | 2021-05-24 10:52:23 -0400 | [diff] [blame^] | 16 | sk_FragColor = value.xxxx; |
John Stiles | b024549 | 2020-09-14 17:30:13 -0400 | [diff] [blame] | 17 | } |