Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / resources / sksl / intrinsics / Transpose.sksl
1 uniform float2x2 testMatrix2x2;
2 uniform float3x3 testMatrix3x3;
3 uniform half4 colorGreen, colorRed;
4
5 half4 main(float2 coords) {
6     float2x3 testMatrix2x3 = float2x3(1, 2, 3, 4, 5, 6);
7     const float2x4 testMatrix2x4 = float2x4(1, 2, 3, 4, 5, 6, 7, 8);
8     const float3x2 testMatrix3x2 = float3x2(1, 2, 3, 4, 5, 6);
9     const float3x4 testMatrix3x4 = float3x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
10     const float4x2 testMatrix4x2 = float4x2(1, 2, 3, 4, 5, 6, 7, 8);
11     const float4x3 testMatrix4x3 = float4x3(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
12     const float4x4 testMatrix4x4 = float4x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
13
14     return (transpose(testMatrix2x2) == float2x2(1, 3,
15                                                  2, 4) &&
16             transpose(testMatrix2x3) == float3x2(1, 4,
17                                                  2, 5,
18                                                  3, 6) &&
19             transpose(testMatrix2x4) == float4x2(1, 5,
20                                                  2, 6,
21                                                  3, 7,
22                                                  4, 8) &&
23             transpose(testMatrix3x2) == float2x3(1, 3, 5,
24                                                  2, 4, 6) &&
25             transpose(testMatrix3x3) == float3x3(1, 4, 7,
26                                                  2, 5, 8,
27                                                  3, 6, 9) &&
28             transpose(testMatrix3x4) == float4x3(1, 5, 9,
29                                                  2, 6, 10,
30                                                  3, 7, 11,
31                                                  4, 8, 12) &&
32             transpose(testMatrix4x2) == float2x4(1, 3, 5, 7,
33                                                  2, 4, 6, 8) &&
34             transpose(testMatrix4x3) == float3x4(1, 4, 7, 10,
35                                                  2, 5, 8, 11,
36                                                  3, 6, 9, 12) &&
37             transpose(testMatrix4x4) == float4x4(1, 5,  9, 13,
38                                                  2, 6, 10, 14,
39                                                  3, 7, 11, 15,
40                                                  4, 8, 12, 16)) ? colorGreen : colorRed;
41 }