skia2/tests/sksl/shared/UniformArray.glsl
John Stiles e5d4c43561 Add SkSL test for uniform arrays.
These weren't used anywhere in our test suite.

Change-Id: I35e8607ad2dbddf8f403668bd2b2636a8964d304
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455777
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-05 13:25:00 +00:00

14 lines
281 B
GLSL

out vec4 sk_FragColor;
uniform float testArray[5];
uniform vec4 colorGreen;
uniform vec4 colorRed;
vec4 main() {
for (int index = 0;index < 5; ++index) {
if (testArray[index] != float(index + 1)) {
return colorRed;
}
}
return colorGreen;
}