9e952b379b
See http://review.skia.org/460037 for an example of the existing behavior. Const variables are constant-expressions and should be allowed here. Change-Id: I41383d79668785f270b7825485e9f6fa56c553c1 Bug: skia:12549 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/460036 Auto-Submit: John Stiles <johnstiles@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
28 lines
603 B
Plaintext
28 lines
603 B
Plaintext
uniform half4 colorRed, colorGreen;
|
|
|
|
bool check_array_is_int_2(int[2] x) {
|
|
return true;
|
|
}
|
|
|
|
bool test() {
|
|
const int two = 2;
|
|
int a[int4(1, 2, 3, 4).y];
|
|
int b[int(max(-5.5, 2.0))];
|
|
int c[two];
|
|
return check_array_is_int_2(a) && check_array_is_int_2(b) && check_array_is_int_2(c);
|
|
}
|
|
|
|
bool check_array_is_float_3(float[3] x) {
|
|
return true;
|
|
}
|
|
|
|
bool test_param(float a[5*5-22], float b[1+1+1]) {
|
|
return check_array_is_float_3(a) && check_array_is_float_3(b);
|
|
}
|
|
|
|
half4 main(float2 coords) {
|
|
float f[3], g[3];
|
|
return test() && test_param(f, g) ? colorGreen : colorRed;
|
|
}
|
|
|