• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1uniform half4 colorRed, colorGreen;
2
3bool check_array_is_int_2(int[2] x) {
4    return true;
5}
6
7bool test() {
8    const int two = 2;
9    int a[int4(1, 2, 3, 4).y];
10    int b[int(max(-5.5, 2.0))];
11    int c[two];
12    int d[int2(float2x2(1, 2, 3, 4)[0]).y];
13    return check_array_is_int_2(a) &&
14           check_array_is_int_2(b) &&
15           check_array_is_int_2(c) &&
16           check_array_is_int_2(d);
17}
18
19bool check_array_is_float_3(float[3] x) {
20    return true;
21}
22
23bool test_param(float a[5*5-22], float b[1+1+1]) {
24    return check_array_is_float_3(a) && check_array_is_float_3(b);
25}
26
27half4 main(float2 coords) {
28    float f[3], g[3];
29    return test() && test_param(f, g) ? colorGreen : colorRed;
30}
31
32