xref: /aosp_15_r20/external/skia/tests/sksl/shared/Ossfuzz36852.metal (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1#include <metal_stdlib>
2#include <simd/simd.h>
3#ifdef __clang__
4#pragma clang diagnostic ignored "-Wall"
5#endif
6using namespace metal;
7struct Inputs {
8};
9struct Outputs {
10    half4 sk_FragColor [[color(0)]];
11};
12
13half4 half4_from_half2x2(half2x2 x) {
14    return half4(x[0].xy, x[1].xy);
15}
16fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
17    Outputs _out;
18    (void)_out;
19    half2x2 x = half2x2(half2(0.0h, 1.0h), half2(2.0h, 3.0h));
20    float2 y = float2(half4_from_half2x2(x).xy);
21    _out.sk_FragColor = half4(float4(y, 0.0, 1.0));
22    return _out;
23}
24