summaryrefslogtreecommitdiff
path: root/src/backend_mtl.m
blob: 9a99e146828ede117c7f3818f7a235383c837a3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#define GPU_METAL 1

#ifdef GPU_METAL
#include <celeritas.h>

// Obj-C imports
#import <Foundation/Foundation.h>
#import <Metal/Metal.h>
#import <MetalKit/MetalKit.h>
#import <QuartzCore/CAMetalLayer.h>

// --- RAL types
struct gpu_device {
  id<MTLDevice> id;
};

struct gpu_swapchain {
  int width, height;
  CAMetalLayer* swapchain;
};

#endif