1cb93a386Sopenharmony_ci#include <metal_stdlib> 2cb93a386Sopenharmony_ci#include <simd/simd.h> 3cb93a386Sopenharmony_ciusing namespace metal; 4cb93a386Sopenharmony_cistruct Uniforms { 5cb93a386Sopenharmony_ci uint a; 6cb93a386Sopenharmony_ci}; 7cb93a386Sopenharmony_cistruct Inputs { 8cb93a386Sopenharmony_ci}; 9cb93a386Sopenharmony_cistruct Outputs { 10cb93a386Sopenharmony_ci half4 sk_FragColor [[color(0)]]; 11cb93a386Sopenharmony_ci}; 12cb93a386Sopenharmony_cifragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { 13cb93a386Sopenharmony_ci Outputs _out; 14cb93a386Sopenharmony_ci (void)_out; 15cb93a386Sopenharmony_ci _out.sk_FragColor.xy = half2(float2(as_type<half2>(_uniforms.a))); 16cb93a386Sopenharmony_ci _out.sk_FragColor.xy = half2(unpack_unorm2x16_to_float(_uniforms.a)); 17cb93a386Sopenharmony_ci _out.sk_FragColor.xy = half2(unpack_snorm2x16_to_float(_uniforms.a)); 18cb93a386Sopenharmony_ci _out.sk_FragColor = half4(unpack_unorm4x8_to_float(_uniforms.a)); 19cb93a386Sopenharmony_ci _out.sk_FragColor = half4(unpack_snorm4x8_to_float(_uniforms.a)); 20cb93a386Sopenharmony_ci return _out; 21cb93a386Sopenharmony_ci} 22