mirror of https://github.com/AxioDL/boo.git
Better Metal shader error handling
This commit is contained in:
parent
758be7d76c
commit
3d96463db7
|
@ -1049,14 +1049,14 @@ IShaderPipeline* MetalDataFactory::Context::newShaderPipeline(const char* vertSo
|
|||
id<MTLLibrary> vertShaderLib = [m_parent.m_ctx->m_dev newLibraryWithSource:@(vertSource)
|
||||
options:compOpts
|
||||
error:&err];
|
||||
if (err)
|
||||
if (!vertShaderLib)
|
||||
Log.report(logvisor::Fatal, "error compiling vert shader: %s", [[err localizedDescription] UTF8String]);
|
||||
id<MTLFunction> vertFunc = [vertShaderLib newFunctionWithName:@"vmain"];
|
||||
|
||||
id<MTLLibrary> fragShaderLib = [m_parent.m_ctx->m_dev newLibraryWithSource:@(fragSource)
|
||||
options:compOpts
|
||||
error:&err];
|
||||
if (err)
|
||||
if (!fragShaderLib)
|
||||
Log.report(logvisor::Fatal, "error compiling frag shader: %s", [[err localizedDescription] UTF8String]);
|
||||
id<MTLFunction> fragFunc = [fragShaderLib newFunctionWithName:@"fmain"];
|
||||
|
||||
|
|
Loading…
Reference in New Issue