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.
14 lines
328 B
14 lines
328 B
#import "vt_utils.h"
|
|
#import <Foundation/Foundation.h>
|
|
#import <Metal/Metal.h>
|
|
|
|
bool cvpx_system_has_metal_device()
|
|
{
|
|
#if TARGET_OS_IPHONE
|
|
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
|
|
return device != nil;
|
|
#else
|
|
NSArray <id<MTLDevice>> *devices = MTLCopyAllDevices();
|
|
return devices.count > 0;
|
|
#endif
|
|
}
|