xref: /aosp_15_r20/external/skia/DATA/skia_resources/sksl/shared/TemporaryIndexLookup.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 colorGreen, colorRed;
2uniform float3x3 testMatrix3x3;
3
4noinline float3x3 GetTestMatrix() {
5    return testMatrix3x3;
6}
7
8half4 main(float2 coords) {
9    float expected = 0.0;
10    for (int i=0; i<3; ++i) {
11        for (int j=0; j<3; ++j) {
12            expected += 1.0;
13            if (GetTestMatrix()[i][j] != expected) {
14                return colorRed;
15            }
16        }
17    }
18
19    return colorGreen;
20}
21