mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -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];
|
id<MTLLibrary> lib = [m_obj newLibraryWithData:(dispatch_data_t)_data error:&error];
|
||||||
BX_WARN(NULL == error
|
BX_WARN(NULL == error
|
||||||
, "newLibraryWithData failed: %s"
|
, "newLibraryWithData failed: %s"
|
||||||
, error.localizedDescription.UTF8String
|
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||||
);
|
);
|
||||||
return lib;
|
return lib;
|
||||||
}
|
}
|
||||||
|
@ -150,10 +150,10 @@ namespace bgfx { namespace mtl
|
||||||
{
|
{
|
||||||
NSError* error;
|
NSError* error;
|
||||||
id<MTLLibrary> lib = [m_obj newLibraryWithSource:@(_source) options:nil error:&error];
|
id<MTLLibrary> lib = [m_obj newLibraryWithSource:@(_source) options:nil error:&error];
|
||||||
// BX_WARN(NULL == error
|
BX_WARN(NULL == error
|
||||||
// , "Shader compilation failed: %s"
|
, "Shader compilation failed: %s"
|
||||||
// , [error.localizedDescription UTF8String]
|
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||||
// );
|
);
|
||||||
return lib;
|
return lib;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ namespace bgfx { namespace mtl
|
||||||
id <MTLRenderPipelineState> state = [m_obj newRenderPipelineStateWithDescriptor:_descriptor error:&error];
|
id <MTLRenderPipelineState> state = [m_obj newRenderPipelineStateWithDescriptor:_descriptor error:&error];
|
||||||
BX_WARN(NULL == error
|
BX_WARN(NULL == error
|
||||||
, "newRenderPipelineStateWithDescriptor failed: %s"
|
, "newRenderPipelineStateWithDescriptor failed: %s"
|
||||||
, error.localizedDescription.UTF8String
|
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||||
);
|
);
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ namespace bgfx { namespace mtl
|
||||||
|
|
||||||
BX_WARN(NULL == error
|
BX_WARN(NULL == error
|
||||||
, "newRenderPipelineStateWithDescriptor failed: %s"
|
, "newRenderPipelineStateWithDescriptor failed: %s"
|
||||||
, error.localizedDescription.UTF8String
|
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||||
);
|
);
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ namespace bgfx { namespace mtl
|
||||||
|
|
||||||
BX_WARN(NULL == error
|
BX_WARN(NULL == error
|
||||||
, "newComputePipelineStateWithFunction failed: %s"
|
, "newComputePipelineStateWithFunction failed: %s"
|
||||||
, error.localizedDescription.UTF8String
|
, [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding]
|
||||||
);
|
);
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue