skia2/tests/sksl/folding/MatrixFoldingES3.glsl
John Stiles f1bb464ee4 Add support for constant folding of matrix-times-matrix.
This code should be easily adaptable to matrix-times-vector as well;
just treat the vector as a 1-row or 1-column matrix. I haven't gotten
around to writing tests for this, though.

Change-Id: If59ae52cd12952b44d3574d54398b2dc66edbcc8
Bug: skia:12819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505221
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-08 14:35:45 +00:00

21 lines
458 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorRed;
uniform vec4 colorGreen;
bool test_eq_half_b() {
bool ok = true;
return ok;
}
bool test_matrix_op_matrix_float_b() {
bool ok = true;
return ok;
}
bool test_matrix_op_matrix_half_b() {
bool ok = true;
return ok;
}
vec4 main() {
bool _0_ok = true;
return ((_0_ok && test_eq_half_b()) && test_matrix_op_matrix_float_b()) && test_matrix_op_matrix_half_b() ? colorGreen : colorRed;
}