Metal: Add shader compilation error message to DAWN_VALIDATION_ERROR
BUG=dawn:498 Change-Id: I850956a6c57ffe9d77e0729e89da6d9a62076509 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26060 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
parent
f03590a754
commit
fada501190
src/dawn_native/metal
|
@ -218,11 +218,10 @@ namespace dawn_native { namespace metal {
|
|||
options:nil
|
||||
error:&error];
|
||||
if (error != nil) {
|
||||
// TODO(cwallez@chromium.org): Switch that NSLog to use dawn::InfoLog or even be
|
||||
// folded in the DAWN_VALIDATION_ERROR
|
||||
NSLog(@"MTLDevice newLibraryWithSource => %@", error);
|
||||
if (error.code != MTLLibraryErrorCompileWarning) {
|
||||
return DAWN_VALIDATION_ERROR("Unable to create library object");
|
||||
const char* errorString = [error.localizedDescription UTF8String];
|
||||
return DAWN_VALIDATION_ERROR(std::string("Unable to create library object: ") +
|
||||
errorString);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue