skia2/tests/sksl/folding/ArrayFolding.glsl
John Stiles 22a54543a8 Add support for constant-folded array inequality checks.
This isn't something I expect to occur often. However, we have always
reported that array-ctors with constant arguments are compile-time
constants, and `compareConstant` is supposed to be implemented for all
compile-time constants.

Change-Id: I0bbfe2a3f78c29c14f69c3b6faca71067a0e45c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391116
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-03-31 15:50:02 +00:00

8 lines
129 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorRed;
uniform vec4 colorGreen;
vec4 main() {
return true ? colorGreen : colorRed;
}