Cocoa Port: If default.metallib is missing or corrupted in the app bundle, then fail running Metal video output and fall back to using OpenGL instead.
This commit is contained in:
parent
183dd57136
commit
c904706a6b
|
@ -61,9 +61,17 @@
|
|||
}
|
||||
|
||||
device = MTLCreateSystemDefaultDevice();
|
||||
|
||||
if (device == nil)
|
||||
{
|
||||
NSLog(@"Metal: A Metal device could not be found.");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
defaultLibrary = [device newDefaultLibrary];
|
||||
if (defaultLibrary == nil)
|
||||
{
|
||||
NSLog(@"Metal: The default.metallib could not be loaded!");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
@ -103,8 +111,6 @@
|
|||
_fetchCommandQueue = [device newCommandQueue];
|
||||
[_fetchCommandQueue setLabel:@"CQ_DeSmuME_FramebufferFetch"];
|
||||
|
||||
defaultLibrary = [device newDefaultLibrary];
|
||||
|
||||
MTLComputePipelineDescriptor *computePipelineDesc = [[MTLComputePipelineDescriptor alloc] init];
|
||||
[computePipelineDesc setThreadGroupSizeIsMultipleOfThreadExecutionWidth:YES];
|
||||
|
||||
|
|
Loading…
Reference in New Issue