• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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};
12struct testBlock {
13    float x;
14} test;
15struct Globals {
16    device testBlock* test;
17};
18fragment Outputs fragmentMain(Inputs _in [[stage_in]], device testBlock& test [[buffer(456)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
19    Globals _globals{&test};
20    (void)_globals;
21    Outputs _out;
22    (void)_out;
23    _out.sk_FragColor = half4(half(_globals.test.x));
24    return _out;
25}
26