mirror of https://github.com/AxioDL/boo.git
Add shader dump to Metal compile failure
This commit is contained in:
parent
ed8cc3a57b
commit
4fb95046a8
|
@ -1109,14 +1109,20 @@ IShaderPipeline* MetalDataFactory::Context::newShaderPipeline(const char* vertSo
|
||||||
options:compOpts
|
options:compOpts
|
||||||
error:&err];
|
error:&err];
|
||||||
if (!vertShaderLib)
|
if (!vertShaderLib)
|
||||||
|
{
|
||||||
|
printf("%s\n", vertSource);
|
||||||
Log.report(logvisor::Fatal, "error compiling vert shader: %s", [[err localizedDescription] UTF8String]);
|
Log.report(logvisor::Fatal, "error compiling vert shader: %s", [[err localizedDescription] UTF8String]);
|
||||||
|
}
|
||||||
id<MTLFunction> vertFunc = [vertShaderLib newFunctionWithName:@"vmain"];
|
id<MTLFunction> vertFunc = [vertShaderLib newFunctionWithName:@"vmain"];
|
||||||
|
|
||||||
id<MTLLibrary> fragShaderLib = [m_parent.m_ctx->m_dev newLibraryWithSource:@(fragSource)
|
id<MTLLibrary> fragShaderLib = [m_parent.m_ctx->m_dev newLibraryWithSource:@(fragSource)
|
||||||
options:compOpts
|
options:compOpts
|
||||||
error:&err];
|
error:&err];
|
||||||
if (!fragShaderLib)
|
if (!fragShaderLib)
|
||||||
|
{
|
||||||
|
printf("%s\n", fragSource);
|
||||||
Log.report(logvisor::Fatal, "error compiling frag shader: %s", [[err localizedDescription] UTF8String]);
|
Log.report(logvisor::Fatal, "error compiling frag shader: %s", [[err localizedDescription] UTF8String]);
|
||||||
|
}
|
||||||
id<MTLFunction> fragFunc = [fragShaderLib newFunctionWithName:@"fmain"];
|
id<MTLFunction> fragFunc = [fragShaderLib newFunctionWithName:@"fmain"];
|
||||||
|
|
||||||
MetalShaderPipeline* retval = new MetalShaderPipeline(m_parent.m_ctx, vertFunc, fragFunc,
|
MetalShaderPipeline* retval = new MetalShaderPipeline(m_parent.m_ctx, vertFunc, fragFunc,
|
||||||
|
|
Loading…
Reference in New Issue