skia2/tests/sksl/folding/BoolFolding.sksl
John Stiles 74192fde0d Migrate constant folding tests into a separate directory.
This CL also adds tests for vector*scalar and scalar*vector folding.
We currently do not constant-fold these, but support will be added in a
followup CL.

Change-Id: I68d7374ae15ab2f4d805a095803b645c92fb03d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/352237
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-01-11 18:05:18 +00:00

9 lines
303 B
Plaintext

void main() {
sk_FragColor.r = 1 == 1 || 2 == 8 ? 1 : -1;
sk_FragColor.r = 1 > 1 || 2 == 8 ? 2 : -2;
sk_FragColor.r = 1 == 1 && 2 <= 8 ? 3 : -3;
sk_FragColor.r = 1 == 2 && 2 == 8 ? 4 : -4;
sk_FragColor.r = 1 == 1 ^^ 1 != 1 ? 5 : -5;
sk_FragColor.r = 1 == 1 ^^ 1 == 1 ? 6 : -6;
}