skia2/resources/sksl/shared/Matrices.sksl
Greg Daniel 4908a24d4b Revert "Add support for matrix == and != in Metal shaders."
This reverts commit c501857188.

Reason for revert: breaking many bots

Original change's description:
> Add support for matrix == and != in Metal shaders.
>
> We need to polyfill an operator== and != when these are first
> encountered in the code.
>
> Change-Id: I539c838ee1871bcb0c4b66abb8a4a0f91146cd4f
> Bug: skia:11306
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368496
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: Id583109a0d167c2c58a57644b14cd5f49d670737
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11306
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368801
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-10 14:25:54 +00:00

48 lines
1.1 KiB
Plaintext

uniform half4 colorGreen, colorRed;
bool test_float() {
float3 v1 = float3x3(1) * float3(2);
float3 v2 = float3(2) * float3x3(1);
float2x2 m1 = float2x2(float4(1, 2, 3, 4));
float2x2 m2 = float2x2(float4(0));
float2x2 m3 = float2x2(m1);
float2x2 m4 = float2x2(1);
m3 *= m4;
float2x2 m5 = float2x2(m1[0][0]);
float2x2 m6 = float2x2(1, 2, 3, 4);
m6 += m5;
float2x2 m7 = float2x2(5, float3(6, 7, 8));
float3x3 m9 = float3x3(1);
float4x4 m10 = float4x4(1);
float4x4 m11 = float4x4(2);
m11 -= m10;
return true;
}
bool test_half() {
half3 v1 = half3x3(1) * half3(2);
half3 v2 = half3(2) * half3x3(1);
half2x2 m1 = half2x2(half4(1, 2, 3, 4));
half2x2 m2 = half2x2(half4(0));
half2x2 m3 = half2x2(m1);
half2x2 m4 = half2x2(1);
m3 *= m4;
half2x2 m5 = half2x2(m1[0][0]);
half2x2 m6 = half2x2(1, 2, 3, 4);
m6 += m5;
half2x2 m7 = half2x2(5, half3(6, 7, 8));
half3x3 m9 = half3x3(1);
half4x4 m10 = half4x4(1);
half4x4 m11 = half4x4(2);
m11 -= m10;
return true;
}
half4 main() {
return test_float() && test_half() ? colorGreen : colorRed;
}