skia2/tests/sksl/workarounds/RewriteMatrixComparisonsStandaloneSettings.glsl
John Stiles 5ee369f623 Rename caps bit for matrix comparison rewrites.
This was originally designated for 2x2 matrices only, but this was not
right--all matrix comparisons actually need to be rewritten to fully
work around the bug.

Change-Id: I743d16a65bc55e93361a3dd8753653384583f063
Bug: skia:11308
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411416
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-21 22:31:53 +00:00

19 lines
657 B
GLSL

out vec4 sk_FragColor;
uniform vec4 colorGreen;
uniform vec4 colorRed;
uniform mat2 testHalf2x2;
uniform mat2 testFloat2x2;
uniform mat3 testHalf3x3;
uniform mat4x2 testFloat4x2;
vec4 main() {
bool _0_ok = true;
_0_ok = _0_ok && testHalf2x2 == mat2(1.0, 2.0, 3.0, 4.0);
_0_ok = _0_ok && testFloat2x2 == mat2(5.0, 6.0, 7.0, 8.0);
_0_ok = _0_ok && testHalf2x2 != mat2(123.0);
_0_ok = _0_ok && testFloat2x2 != mat2(456.0);
_0_ok = _0_ok && testHalf3x3 == mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
_0_ok = _0_ok && testFloat4x2 != mat4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0);
return _0_ok ? colorGreen : colorRed;
}