mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Metal: Fixed ObjC -> C string conversion.
This commit is contained in:
parent
42a14522af
commit
dd391067d0
1 changed files with 8 additions and 8 deletions
|
@ -141,7 +141,7 @@ namespace bgfx { namespace mtl
|
|||
id<MTLLibrary> lib = [m_obj newLibraryWithData:(dispatch_data_t)_data error:&error];
|
||||
BX_WARN(NULL == error
|
||||
, "newLibraryWithData failed: %s"
|
||||
, error.localizedDescription.UTF8String
|
||||
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||
);
|
||||
return lib;
|
||||
}
|
||||
|
@ -150,10 +150,10 @@ namespace bgfx { namespace mtl
|
|||
{
|
||||
NSError* error;
|
||||
id<MTLLibrary> lib = [m_obj newLibraryWithSource:@(_source) options:nil error:&error];
|
||||
// BX_WARN(NULL == error
|
||||
// , "Shader compilation failed: %s"
|
||||
// , [error.localizedDescription UTF8String]
|
||||
// );
|
||||
BX_WARN(NULL == error
|
||||
, "Shader compilation failed: %s"
|
||||
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||
);
|
||||
return lib;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ namespace bgfx { namespace mtl
|
|||
id <MTLRenderPipelineState> state = [m_obj newRenderPipelineStateWithDescriptor:_descriptor error:&error];
|
||||
BX_WARN(NULL == error
|
||||
, "newRenderPipelineStateWithDescriptor failed: %s"
|
||||
, error.localizedDescription.UTF8String
|
||||
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||
);
|
||||
return state;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ namespace bgfx { namespace mtl
|
|||
|
||||
BX_WARN(NULL == error
|
||||
, "newRenderPipelineStateWithDescriptor failed: %s"
|
||||
, error.localizedDescription.UTF8String
|
||||
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||
);
|
||||
return state;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ namespace bgfx { namespace mtl
|
|||
|
||||
BX_WARN(NULL == error
|
||||
, "newComputePipelineStateWithFunction failed: %s"
|
||||
, error.localizedDescription.UTF8String
|
||||
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||
);
|
||||
return state;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue