You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
456 B
25 lines
456 B
//
|
|
// SCMetalUtils.m
|
|
// Snapchat
|
|
//
|
|
// Created by Michel Loenngren on 8/16/17.
|
|
//
|
|
//
|
|
|
|
#import "SCMetalUtils.h"
|
|
|
|
#import <SCFoundation/SCTrace.h>
|
|
|
|
id<MTLDevice> SCGetManagedCaptureMetalDevice(void)
|
|
{
|
|
#if !TARGET_IPHONE_SIMULATOR
|
|
SCTraceStart();
|
|
static dispatch_once_t onceToken;
|
|
static id<MTLDevice> device;
|
|
dispatch_once(&onceToken, ^{
|
|
device = MTLCreateSystemDefaultDevice();
|
|
});
|
|
return device;
|
|
#endif
|
|
return nil;
|
|
}
|